Enum Class CpDeploymentProfile
- All Implemented Interfaces:
Serializable, Comparable<CpDeploymentProfile>, Constable
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionVersion1: three voters, tolerating one unavailable voter while retaining a majority.Version1: five voters, tolerating two unavailable voters while retaining a majority. -
Method Summary
Modifier and TypeMethodDescriptionReturns the maximum assumed measured clock uncertainty.org.j7m.middleware.consensus.NetworkConsensusConfigconfiguration(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.Returns the qualification recovery bound after sufficient voters return.static CpDeploymentProfileReturns the enum constant of this class with the specified name.static CpDeploymentProfile[]values()Returns an array containing the constants of this enum class, in the order they are declared.intvoters()Returns the exact authorized voter count.
-
Enum Constant Details
-
DEVELOPMENT_LINUX_JAVA25_CP3_V1
Version1: three voters, tolerating one unavailable voter while retaining a majority. -
DEVELOPMENT_LINUX_JAVA25_CP5_V1
Version1: five voters, tolerating two unavailable voters while retaining a majority.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
voters
public int voters()Returns the exact authorized voter count.- Returns:
- three or five
-
clockUncertaintyAssumption
Returns the maximum assumed measured clock uncertainty. Hosts must use the production measured-time admission checks separately.- Returns:
- 500 milliseconds
-
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 identityauthorizedVoters- exact fixed voter-to-endpoint roster; no learners or implicit discoverydirectory- exclusively owned durable per-node directory, fresh or existing for restartauthenticationKey- caller-provisioned secret of at least32 bytes, defensively copiedtlsContext- mutual TLS context, or null for loopback development onlygroupId- 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 configurationNullPointerException- for required null configuration fields
-