Record Class ManagedPartitionProfile

java.lang.Object
java.lang.Record
org.j7m.middleware.application.distributed.ManagedPartitionProfile
Record Components:
consensus - local native transport/storage configuration and immutable original voter seed
partition - stable partition identity
initialEpoch - original bootstrap epoch, zero for an inactive migration target
resourceScope - fixed authenticated scope owning this complete encoded state
maximumRequests - durable receipt capacity,1..10000; no implicit eviction
serviceAddress - explicit partition service bind address, port zero permitted
principals - bounded authenticated service identities; no principal crosses resourceScope
authorityKey - trusted topology authority key of at least32bytes
clock - authenticated clock health source required by the native partition service
serviceTls - mutual TLS context, mandatory outside loopback

public record ManagedPartitionProfile(org.j7m.middleware.consensus.NetworkConsensusConfig consensus, String partition, long initialEpoch, String resourceScope, int maximumRequests, InetSocketAddress serviceAddress, Map<String, org.j7m.middleware.distributed.PartitionServer.Binding> principals, byte[] authorityKey, org.j7m.middleware.distributed.ReplicatedResourceClient.ClockHealth clock, SSLContext serviceTls) extends Record
Trusted local hosting configuration for one encoded partition, never application annotation data. The native configuration's initialMembers is the immutable ORIGINAL bootstrap seed even after membership changes. Its groupId is only a bounded operator base; the factory replaces it with the exact program/bootstrap fingerprint before opening storage. Local identity, addresses and secrets may differ between members without changing that fingerprint. Credentials are borrowed configuration values and are defensively copied by their native value types. Native snapshot capacity is128MiB, covering retained native transfer images and tail, not only the16MiB resource snapshot.
  • Constructor Details

    • ManagedPartitionProfile

      public ManagedPartitionProfile(org.j7m.middleware.consensus.NetworkConsensusConfig consensus, String partition, long initialEpoch, String resourceScope, int maximumRequests, InetSocketAddress serviceAddress, Map<String, org.j7m.middleware.distributed.PartitionServer.Binding> principals, byte[] authorityKey, org.j7m.middleware.distributed.ReplicatedResourceClient.ClockHealth clock, SSLContext serviceTls)
      Validates the complete host profile before component construction or storage access.
      Throws:
      IllegalArgumentException - for unbounded, insecure, cross-scope or inconsistent settings
      NullPointerException - for missing settings
  • Method Details

    • authorityKey

      public byte[] authorityKey()
      Returns independent topology authority material.
      Returns:
      copied secret bytes, never intended for application injection
    • toString

      public String toString()
      Returns a fixed diagnostic without addresses, configuration or credentials.
      Specified by:
      toString in class Record
      Returns:
      redacted profile description
    • 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.
    • consensus

      public org.j7m.middleware.consensus.NetworkConsensusConfig consensus()
      Returns the value of the consensus record component.
      Returns:
      the value of the consensus record component
    • partition

      public String partition()
      Returns the value of the partition record component.
      Returns:
      the value of the partition record component
    • initialEpoch

      public long initialEpoch()
      Returns the value of the initialEpoch record component.
      Returns:
      the value of the initialEpoch record component
    • resourceScope

      public String resourceScope()
      Returns the value of the resourceScope record component.
      Returns:
      the value of the resourceScope record component
    • maximumRequests

      public int maximumRequests()
      Returns the value of the maximumRequests record component.
      Returns:
      the value of the maximumRequests record component
    • serviceAddress

      public InetSocketAddress serviceAddress()
      Returns the value of the serviceAddress record component.
      Returns:
      the value of the serviceAddress record component
    • principals

      public Map<String, org.j7m.middleware.distributed.PartitionServer.Binding> principals()
      Returns the value of the principals record component.
      Returns:
      the value of the principals record component
    • clock

      public org.j7m.middleware.distributed.ReplicatedResourceClient.ClockHealth clock()
      Returns the value of the clock record component.
      Returns:
      the value of the clock record component
    • serviceTls

      public SSLContext serviceTls()
      Returns the value of the serviceTls record component.
      Returns:
      the value of the serviceTls record component