Record Class ReleaseDescriptor
java.lang.Object
java.lang.Record
org.j7m.middleware.cluster.ReleaseDescriptor
- Record Components:
releaseId- stable deployment revisionartifact- signed D14 whole-artifact manifestprotocolVersion- application wire generationdataSchema- schema written by this revisionminimumReadableSchema- oldest readable persisted schemamaximumReadableSchema- newest readable persisted schema
public record ReleaseDescriptor(String releaseId, org.j7m.middleware.application.repository.ArtifactManifest artifact, int protocolVersion, int dataSchema, int minimumReadableSchema, int maximumReadableSchema)
extends Record
Server-trusted compatibility catalog entry. Administrative clients select its identity only.
Compatibility metadata must be distributed with the operator's trusted catalog, never derived
from unauthenticated request fields.
-
Constructor Summary
ConstructorsConstructorDescriptionReleaseDescriptor(String releaseId, org.j7m.middleware.application.repository.ArtifactManifest artifact, int protocolVersion, int dataSchema, int minimumReadableSchema, int maximumReadableSchema) Validates catalog bounds and schema readability. -
Method Summary
Modifier and TypeMethodDescriptionorg.j7m.middleware.application.repository.ArtifactManifestartifact()Returns the value of theartifactrecord component.booleancompatibleWith(ReleaseDescriptor current, int persistedSchema) Tests rolling compatibility with actual persisted schema and the currently hosted revision.intReturns the value of thedataSchemarecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of themaximumReadableSchemarecord component.intReturns the value of theminimumReadableSchemarecord component.intReturns the value of theprotocolVersionrecord component.Returns the value of thereleaseIdrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ReleaseDescriptor
public ReleaseDescriptor(String releaseId, org.j7m.middleware.application.repository.ArtifactManifest artifact, int protocolVersion, int dataSchema, int minimumReadableSchema, int maximumReadableSchema) Validates catalog bounds and schema readability.
-
-
Method Details
-
compatibleWith
Tests rolling compatibility with actual persisted schema and the currently hosted revision.- Parameters:
current- current trusted revisionpersistedSchema- highest schema that may already have been written- Returns:
- whether N/N-1 wire and schema coexistence are safe
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
releaseId
-
artifact
-
protocolVersion
public int protocolVersion()Returns the value of theprotocolVersionrecord component.- Returns:
- the value of the
protocolVersionrecord component
-
dataSchema
public int dataSchema()Returns the value of thedataSchemarecord component.- Returns:
- the value of the
dataSchemarecord component
-
minimumReadableSchema
public int minimumReadableSchema()Returns the value of theminimumReadableSchemarecord component.- Returns:
- the value of the
minimumReadableSchemarecord component
-
maximumReadableSchema
public int maximumReadableSchema()Returns the value of themaximumReadableSchemarecord component.- Returns:
- the value of the
maximumReadableSchemarecord component
-