public final class ClusterSingletonManagerSettings extends java.lang.Object implements NoSerializationVerificationNeeded
param: role Singleton among the nodes tagged with specified role. If the role is not specified it's a singleton among all nodes in the cluster.
param: removalMargin Margin until the singleton instance that belonged to a downed/removed partition is created in surviving partition. The purpose of this margin is that in case of a network partition the singleton actors in the non-surviving partitions must be stopped before corresponding actors are started somewhere else. This is especially important for persistent actors.
param: handOverRetryInterval When a node is becoming oldest it sends hand-over
request to previous oldest, that might be leaving the cluster. This is
retried with this interval until the previous oldest confirms that the hand
over has started or the previous oldest member is removed from the cluster
(+ removalMargin
).
Constructor and Description |
---|
ClusterSingletonManagerSettings(java.lang.String singletonName,
scala.Option<java.lang.String> role,
scala.concurrent.duration.FiniteDuration removalMargin,
scala.concurrent.duration.FiniteDuration handOverRetryInterval) |
Modifier and Type | Method and Description |
---|---|
static ClusterSingletonManagerSettings |
apply(ActorSystem system)
Create settings from the default configuration
akka.cluster.singleton . |
static ClusterSingletonManagerSettings |
apply(com.typesafe.config.Config config)
Create settings from a configuration with the same layout as
the default configuration
akka.cluster.singleton . |
static ClusterSingletonManagerSettings |
create(ActorSystem system)
Java API: Create settings from the default configuration
akka.cluster.singleton . |
static ClusterSingletonManagerSettings |
create(com.typesafe.config.Config config)
Java API: Create settings from a configuration with the same layout as
the default configuration
akka.cluster.singleton . |
scala.concurrent.duration.FiniteDuration |
handOverRetryInterval() |
scala.concurrent.duration.FiniteDuration |
removalMargin() |
scala.Option<java.lang.String> |
role() |
static scala.Option<java.lang.String> |
roleOption(java.lang.String role)
INTERNAL API
|
java.lang.String |
singletonName() |
ClusterSingletonManagerSettings |
withHandOverRetryInterval(scala.concurrent.duration.FiniteDuration retryInterval) |
ClusterSingletonManagerSettings |
withRemovalMargin(scala.concurrent.duration.FiniteDuration removalMargin) |
ClusterSingletonManagerSettings |
withRole(scala.Option<java.lang.String> role) |
ClusterSingletonManagerSettings |
withRole(java.lang.String role) |
ClusterSingletonManagerSettings |
withSingletonName(java.lang.String name) |
public ClusterSingletonManagerSettings(java.lang.String singletonName, scala.Option<java.lang.String> role, scala.concurrent.duration.FiniteDuration removalMargin, scala.concurrent.duration.FiniteDuration handOverRetryInterval)
public static ClusterSingletonManagerSettings apply(ActorSystem system)
akka.cluster.singleton
.system
- (undocumented)public static ClusterSingletonManagerSettings apply(com.typesafe.config.Config config)
akka.cluster.singleton
.config
- (undocumented)public static ClusterSingletonManagerSettings create(ActorSystem system)
akka.cluster.singleton
.system
- (undocumented)public static ClusterSingletonManagerSettings create(com.typesafe.config.Config config)
akka.cluster.singleton
.config
- (undocumented)public static scala.Option<java.lang.String> roleOption(java.lang.String role)
role
- (undocumented)public java.lang.String singletonName()
public scala.Option<java.lang.String> role()
public scala.concurrent.duration.FiniteDuration removalMargin()
public scala.concurrent.duration.FiniteDuration handOverRetryInterval()
public ClusterSingletonManagerSettings withSingletonName(java.lang.String name)
public ClusterSingletonManagerSettings withRole(java.lang.String role)
public ClusterSingletonManagerSettings withRole(scala.Option<java.lang.String> role)
public ClusterSingletonManagerSettings withRemovalMargin(scala.concurrent.duration.FiniteDuration removalMargin)
public ClusterSingletonManagerSettings withHandOverRetryInterval(scala.concurrent.duration.FiniteDuration retryInterval)