Class ClusterAdminClient
java.lang.Object
org.j7m.middleware.cluster.ClusterAdminClient
- All Implemented Interfaces:
ClusterLifecycle
Authenticated administrative client. Operation identity and expected version remain unchanged on
retries; IOException denotes unavailable or UNKNOWN completion and requires operationStatus.
-
Constructor Summary
ConstructorsConstructorDescriptionClusterAdminClient(InetSocketAddress address, String cluster, String principal, byte[] key, SSLContext tls) Creates an authorized admin client. -
Method Summary
Modifier and TypeMethodDescriptionAdmits a rolling hosted-application upgrade; progress continues through its durable workflow.Reads retained hash-linked lifecycle events.Stops new requests and waits for admitted invocations on one safe hosting target.Inspects actual authenticated hosts and durable workflow state.operationStatus(String id, Instant deadline) Reads a durable operation including an earlier lost response.Persists a checked deployment plan without replacing any application.Plans and applies only a schema-compatible rollback release.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ClusterLifecycle
upgrade
-
Constructor Details
-
ClusterAdminClient
public ClusterAdminClient(InetSocketAddress address, String cluster, String principal, byte[] key, SSLContext tls) Creates an authorized admin client.- Parameters:
address- explicit endpointcluster- stable cluster identityprincipal- configured identitykey- independent authentication keytls- mutual TLS context, mandatory outside loopback
-
-
Method Details
-
inspect
Inspects actual authenticated hosts and durable workflow state.- Specified by:
inspectin interfaceClusterLifecycle- Parameters:
deadline- absolute deadline- Returns:
- immutable fleet view
- Throws:
IOException- for unavailable authority
-
plan
public DeploymentPlan plan(String id, long expected, String release, List<String> targets, Instant deadline) throws IOException Persists a checked deployment plan without replacing any application.- Specified by:
planin interfaceClusterLifecycle- Parameters:
id- stable planning identityexpected- optimistic fleet generationrelease- trusted server catalog releasetargets- ordered hosting targetsdeadline- absolute deadline- Returns:
- immutable plan
- Throws:
IOException- conflict, incompatible release or unavailable authority
-
apply
public OperationStatus apply(String id, long expected, String plan, Instant deadline) throws IOException Admits a rolling hosted-application upgrade; progress continues through its durable workflow.- Specified by:
applyin interfaceClusterLifecycle- Parameters:
id- stable deployment identityexpected- optimistic generation used by the planplan- immutable plan identitydeadline- absolute deadline- Returns:
- persisted current operation status
- Throws:
IOException- conflict, incompatible plan or unavailable authority
-
drain
public OperationStatus drain(String id, long expected, String node, Instant deadline) throws IOException Stops new requests and waits for admitted invocations on one safe hosting target.- Specified by:
drainin interfaceClusterLifecycle- Parameters:
id- stable drain identityexpected- optimistic fleet generationnode- hosting targetdeadline- absolute deadline- Returns:
- durable drain status
- Throws:
IOException- conflict, insufficient capacity or unavailable authority
-
rollback
public OperationStatus rollback(String id, long expected, String release, List<String> targets, Instant deadline) throws IOException Plans and applies only a schema-compatible rollback release.- Specified by:
rollbackin interfaceClusterLifecycle- Parameters:
id- stable rollback identityexpected- inspected fleet generationrelease- trusted retained releasetargets- ordered hosting targetsdeadline- absolute deadline- Returns:
- persisted rollback status
- Throws:
IOException- incompatible downgrade, conflict or unavailable authority
-
operationStatus
Reads a durable operation including an earlier lost response.- Specified by:
operationStatusin interfaceClusterLifecycle- Parameters:
id- admitted identitydeadline- absolute deadline- Returns:
- persisted status
- Throws:
IOException- not found or unavailable authority
-
audit
Reads retained hash-linked lifecycle events.- Specified by:
auditin interfaceClusterLifecycle- Parameters:
id- workflow identitydeadline- absolute deadline- Returns:
- immutable audit sequence
- Throws:
IOException- unavailable authority
-