Package io.aeron.cluster.service
Class ClusteredServiceContainer
java.lang.Object
io.aeron.cluster.service.ClusteredServiceContainer
- All Implemented Interfaces:
AutoCloseable
Container for a service in the cluster managed by the Consensus Module. This is where business logic resides and
loaded via
ClusteredServiceContainer.Configuration.SERVICE_CLASS_NAME_PROP_NAME or
ClusteredServiceContainer.Context.clusteredService(ClusteredService).-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classConfiguration options for the consensus module and service container within a cluster.static final classThe context will be owned byClusteredServiceAgentafter a successfullaunch(Context)and closed viaclose(). -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()context()Get theClusteredServiceContainer.Contextthat is used by thisClusteredServiceContainer.static ClusteredServiceContainerlaunch()Launch an ClusteredServiceContainer using a default configuration.static ClusteredServiceContainerLaunch a ClusteredServiceContainer by providing a configuration context.static voidLaunch the clustered service container and await a shutdown signal.
-
Method Details
-
main
Launch the clustered service container and await a shutdown signal.- Parameters:
args- command line argument which is a list for properties files as URLs or filenames.
-
launch
Launch an ClusteredServiceContainer using a default configuration.- Returns:
- a new instance of a ClusteredServiceContainer.
-
launch
Launch a ClusteredServiceContainer by providing a configuration context.- Parameters:
ctx- for the configuration parameters.- Returns:
- a new instance of a ClusteredServiceContainer.
-
context
Get theClusteredServiceContainer.Contextthat is used by thisClusteredServiceContainer.- Returns:
- the
ClusteredServiceContainer.Contextthat is used by thisClusteredServiceContainer.
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-