Enum Class CpDeploymentProfile

java.lang.Object
java.lang.Enum<CpDeploymentProfile>
org.j7m.middleware.cluster.CpDeploymentProfile
All Implemented Interfaces:
Serializable, Comparable<CpDeploymentProfile>, Constable

public enum CpDeploymentProfile extends Enum<CpDeploymentProfile>
Versioned CP bootstrap profiles for Linux/Java25 development qualification. The roster is explicit and contains exactly the authorized voters, without discovery or learners. Local durable storage must support fsync and atomic rename. Recovery and clock values describe qualification assumptions, not measured runtime guarantees or an accepted production SLO. A profile does not create directories, provision credentials, start nodes or change existing voters.
  • Enum Constant Details

    • DEVELOPMENT_LINUX_JAVA25_CP3_V1

      public static final CpDeploymentProfile DEVELOPMENT_LINUX_JAVA25_CP3_V1
      Version1: three voters, tolerating one unavailable voter while retaining a majority.
    • DEVELOPMENT_LINUX_JAVA25_CP5_V1

      public static final CpDeploymentProfile DEVELOPMENT_LINUX_JAVA25_CP5_V1
      Version1: five voters, tolerating two unavailable voters while retaining a majority.
  • Method Details

    • values

      public static CpDeploymentProfile[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static CpDeploymentProfile valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • voters

      public int voters()
      Returns the exact authorized voter count.
      Returns:
      three or five
    • clockUncertaintyAssumption

      public Duration clockUncertaintyAssumption()
      Returns the maximum assumed measured clock uncertainty. Hosts must use the production measured-time admission checks separately.
      Returns:
      500 milliseconds
    • recoveryAssumption

      public Duration recoveryAssumption()
      Returns the qualification recovery bound after sufficient voters return.
      Returns:
      30 seconds; this is not a runtime SLO promise
    • configuration

      public org.j7m.middleware.consensus.NetworkConsensusConfig configuration(String nodeId, Map<String, InetSocketAddress> authorizedVoters, Path directory, byte[] authenticationKey, SSLContext tlsContext, String groupId)
      Builds immutable settings for one explicitly authorized voter, including restart settings. The caller owns an exclusive per-node directory and supplies protected credentials. An existing directory is permitted for normal restart; the node validates its durable generation/ownership. Non-loopback endpoints require caller-provisioned mutual TLS; null TLS is loopback-only. Distinct replication groups and fresh recovery generations require explicit distinct group IDs.
      Parameters:
      nodeId - local authorized voter identity
      authorizedVoters - exact fixed voter-to-endpoint roster; no learners or implicit discovery
      directory - exclusively owned durable per-node directory, fresh or existing for restart
      authenticationKey - caller-provisioned secret of at least32 bytes, defensively copied
      tlsContext - mutual TLS context, or null for loopback development only
      groupId - explicit stable consensus generation identity
      Returns:
      validated configuration with500ms election,20ms heartbeat,1MiB frames and128MiB snapshots
      Throws:
      IllegalArgumentException - for a wrong roster, invalid endpoint or unsafe configuration
      NullPointerException - for required null configuration fields