Package io.aeron.cluster
Interface ConsensusModuleControl
public interface ConsensusModuleControl
Control interface for performing operations on the consensus module from a
ConsensusModuleExtension.-
Method Summary
Modifier and TypeMethodDescriptionaeron()TheAeronclient to be used by the extension.archive()TheAeronArchiveclient to be used by the extension.TheAuthorisationServiceused by the consensus module.voidcloseClusterSession(long clusterSessionId) Close a cluster session as an administrative function.intNumeric id for the cluster (used when running multiple clusters on the same media driver).The current cluster member for this node.intNumeric id for the commit position counter.context()TheConsensusModule.Contextunder which the extension is running.getClientSession(long clusterSessionId) Lookup aClusterClientSessionfor a given id.IdleStrategywhich should be used by the extension when it experiences back-pressure or is undertaking any long-running actions.intmemberId()The unique id for the hosting member of the cluster.longtime()Cluster time astimeUnit()s since 1 Jan 1970 UTC.timeUnit()The unit of time applied when timestamping and invokingtime()operations.
-
Method Details
-
memberId
int memberId()The unique id for the hosting member of the cluster.- Returns:
- unique id for the hosting member of the cluster.
-
time
long time()Cluster time astimeUnit()s since 1 Jan 1970 UTC.- Returns:
- time as
timeUnit()s since 1 Jan 1970 UTC. - See Also:
-
timeUnit
TimeUnit timeUnit()The unit of time applied when timestamping and invokingtime()operations. -
idleStrategy
IdleStrategy idleStrategy()IdleStrategywhich should be used by the extension when it experiences back-pressure or is undertaking any long-running actions.- Returns:
- the
IdleStrategywhich should be used by the extension when it experiences back-pressure or is undertaking any long-running actions.
-
context
ConsensusModule.Context context()TheConsensusModule.Contextunder which the extension is running.- Returns:
- the
ConsensusModule.Contextunder which the extension is running.
-
aeron
Aeron aeron()TheAeronclient to be used by the extension.- Returns:
- the
Aeronclient to be used by the extension.
-
archive
AeronArchive archive()TheAeronArchiveclient to be used by the extension.- Returns:
- the
AeronArchiveclient to be used by the extension.
-
authorisationService
AuthorisationService authorisationService()TheAuthorisationServiceused by the consensus module.- Returns:
- the
AuthorisationServiceused by the consensus module.
-
getClientSession
Lookup aClusterClientSessionfor a given id.- Parameters:
clusterSessionId- for the session to lookup.- Returns:
- a
ClusterClientSessionfor a given id, otherwisenullif not found.
-
closeClusterSession
void closeClusterSession(long clusterSessionId) Close a cluster session as an administrative function.- Parameters:
clusterSessionId- to be closed.
-
commitPositionCounterId
int commitPositionCounterId()Numeric id for the commit position counter.- Returns:
- commit position counter id.
-
clusterId
int clusterId()Numeric id for the cluster (used when running multiple clusters on the same media driver).- Returns:
- numeric id for the cluster.
- See Also:
-
clusterMember
ClusterMember clusterMember()The current cluster member for this node.- Returns:
- cluster member for this node.
-