Record Class ReleaseDescriptor

java.lang.Object
java.lang.Record
org.j7m.middleware.cluster.ReleaseDescriptor
Record Components:
releaseId - stable deployment revision
artifact - signed D14 whole-artifact manifest
protocolVersion - application wire generation
dataSchema - schema written by this revision
minimumReadableSchema - oldest readable persisted schema
maximumReadableSchema - 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 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

      public boolean compatibleWith(ReleaseDescriptor current, int persistedSchema)
      Tests rolling compatibility with actual persisted schema and the currently hosted revision.
      Parameters:
      current - current trusted revision
      persistedSchema - highest schema that may already have been written
      Returns:
      whether N/N-1 wire and schema coexistence are safe
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • releaseId

      public String releaseId()
      Returns the value of the releaseId record component.
      Returns:
      the value of the releaseId record component
    • artifact

      public org.j7m.middleware.application.repository.ArtifactManifest artifact()
      Returns the value of the artifact record component.
      Returns:
      the value of the artifact record component
    • protocolVersion

      public int protocolVersion()
      Returns the value of the protocolVersion record component.
      Returns:
      the value of the protocolVersion record component
    • dataSchema

      public int dataSchema()
      Returns the value of the dataSchema record component.
      Returns:
      the value of the dataSchema record component
    • minimumReadableSchema

      public int minimumReadableSchema()
      Returns the value of the minimumReadableSchema record component.
      Returns:
      the value of the minimumReadableSchema record component
    • maximumReadableSchema

      public int maximumReadableSchema()
      Returns the value of the maximumReadableSchema record component.
      Returns:
      the value of the maximumReadableSchema record component