Package io.aeron.cluster
Class ConsensusModule
java.lang.Object
io.aeron.cluster.ConsensusModule
- All Implemented Interfaces:
AutoCloseable
Component which resides on each node and is responsible for coordinating consensus within a cluster in concert
with the lifecycle of clustered services.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classConfiguration options for cluster.static final classProgrammable overrides for configuring theConsensusModulein a cluster.static enumPossible states for theConsensusModule. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDefault set of flags when taking a snapshot.static final intFlag for a snapshot taken on a standby node. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Get theAgentInvokerfor the consensus module.context()Get theConsensusModule.Contextthat is used by thisConsensusModule.static ConsensusModulelaunch()Launch anConsensusModuleusing a default configuration.static ConsensusModuleLaunch anConsensusModuleby providing a configuration context.static voidLaunch anConsensusModulewith that communicates with an out of processArchiveandMediaDriverthen awaits shutdown signal.toString()
-
Field Details
-
CLUSTER_ACTION_FLAGS_DEFAULT
public static final int CLUSTER_ACTION_FLAGS_DEFAULTDefault set of flags when taking a snapshot.- See Also:
-
CLUSTER_ACTION_FLAGS_STANDBY_SNAPSHOT
public static final int CLUSTER_ACTION_FLAGS_STANDBY_SNAPSHOTFlag for a snapshot taken on a standby node.- See Also:
-
-
Method Details
-
main
Launch anConsensusModulewith that communicates with an out of processArchiveandMediaDriverthen awaits shutdown signal.- Parameters:
args- command line argument which is a list for properties files as URLs or filenames.
-
launch
Launch anConsensusModuleusing a default configuration.- Returns:
- a new instance of an
ConsensusModule.
-
launch
Launch anConsensusModuleby providing a configuration context.- Parameters:
ctx- for the configuration parameters.- Returns:
- a new instance of an
ConsensusModule.
-
context
Get theConsensusModule.Contextthat is used by thisConsensusModule.- Returns:
- the
ConsensusModule.Contextthat is used by thisConsensusModule.
-
conductorAgentInvoker
Get theAgentInvokerfor the consensus module.- Returns:
- the
AgentInvokerfor the consensus module.
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
toString
-