Package akka.cluster.typed
Class ClusterSingletonManagerSettings
- java.lang.Object
-
- akka.cluster.typed.ClusterSingletonManagerSettings
-
public final class ClusterSingletonManagerSettings extends java.lang.Object
param: singletonName The actor name of the child singleton actor. 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
). param: leaseSettings LeaseSettings for acquiring before creating the singleton actor
-
-
Constructor Summary
Constructors Constructor Description ClusterSingletonManagerSettings(java.lang.String singletonName, scala.Option<java.lang.String> role, scala.concurrent.duration.FiniteDuration removalMargin, scala.concurrent.duration.FiniteDuration handOverRetryInterval)
Deprecated.Use constructor with leaseSettings.ClusterSingletonManagerSettings(java.lang.String singletonName, scala.Option<java.lang.String> role, scala.concurrent.duration.FiniteDuration removalMargin, scala.concurrent.duration.FiniteDuration handOverRetryInterval, scala.Option<LeaseUsageSettings> leaseSettings)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ClusterSingletonManagerSettings
apply(ActorSystem<?> system)
Create settings from the default configurationakka.cluster.singleton
.static ClusterSingletonManagerSettings
apply(com.typesafe.config.Config config)
Create settings from a configuration with the same layout as the default configurationakka.cluster.singleton
.static ClusterSingletonManagerSettings
create(ActorSystem<?> system)
Java API: Create settings from the default configurationakka.cluster.singleton
.static ClusterSingletonManagerSettings
create(com.typesafe.config.Config config)
Java API: Create settings from a configuration with the same layout as the default configurationakka.cluster.singleton
.scala.concurrent.duration.FiniteDuration
handOverRetryInterval()
scala.Option<LeaseUsageSettings>
leaseSettings()
scala.concurrent.duration.FiniteDuration
removalMargin()
scala.Option<java.lang.String>
role()
java.lang.String
singletonName()
ClusterSingletonManagerSettings
withHandOverRetryInterval(java.time.Duration retryInterval)
ClusterSingletonManagerSettings
withHandOverRetryInterval(scala.concurrent.duration.FiniteDuration retryInterval)
ClusterSingletonManagerSettings
withLeaseSettings(LeaseUsageSettings leaseSettings)
ClusterSingletonManagerSettings
withRemovalMargin(java.time.Duration removalMargin)
ClusterSingletonManagerSettings
withRemovalMargin(scala.concurrent.duration.FiniteDuration removalMargin)
ClusterSingletonManagerSettings
withRole(java.lang.String role)
ClusterSingletonManagerSettings
withRole(scala.Option<java.lang.String> role)
ClusterSingletonManagerSettings
withSingletonName(java.lang.String name)
-
-
-
Constructor Detail
-
ClusterSingletonManagerSettings
public ClusterSingletonManagerSettings(java.lang.String singletonName, scala.Option<java.lang.String> role, scala.concurrent.duration.FiniteDuration removalMargin, scala.concurrent.duration.FiniteDuration handOverRetryInterval, scala.Option<LeaseUsageSettings> leaseSettings)
-
ClusterSingletonManagerSettings
public ClusterSingletonManagerSettings(java.lang.String singletonName, scala.Option<java.lang.String> role, scala.concurrent.duration.FiniteDuration removalMargin, scala.concurrent.duration.FiniteDuration handOverRetryInterval)
Deprecated.Use constructor with leaseSettings. Since 2.6.15.
-
-
Method Detail
-
apply
public static ClusterSingletonManagerSettings apply(ActorSystem<?> system)
Create settings from the default configurationakka.cluster.singleton
.
-
apply
public static ClusterSingletonManagerSettings apply(com.typesafe.config.Config config)
Create settings from a configuration with the same layout as the default configurationakka.cluster.singleton
.
-
create
public static ClusterSingletonManagerSettings create(ActorSystem<?> system)
Java API: Create settings from the default configurationakka.cluster.singleton
.
-
create
public static ClusterSingletonManagerSettings create(com.typesafe.config.Config config)
Java API: Create settings from a configuration with the same layout as the default configurationakka.cluster.singleton
.
-
singletonName
public java.lang.String singletonName()
-
role
public scala.Option<java.lang.String> role()
-
removalMargin
public scala.concurrent.duration.FiniteDuration removalMargin()
-
handOverRetryInterval
public scala.concurrent.duration.FiniteDuration handOverRetryInterval()
-
leaseSettings
public scala.Option<LeaseUsageSettings> leaseSettings()
-
withSingletonName
public ClusterSingletonManagerSettings withSingletonName(java.lang.String name)
-
withRole
public ClusterSingletonManagerSettings withRole(java.lang.String role)
-
withRole
public ClusterSingletonManagerSettings withRole(scala.Option<java.lang.String> role)
-
withRemovalMargin
public ClusterSingletonManagerSettings withRemovalMargin(scala.concurrent.duration.FiniteDuration removalMargin)
-
withRemovalMargin
public ClusterSingletonManagerSettings withRemovalMargin(java.time.Duration removalMargin)
-
withHandOverRetryInterval
public ClusterSingletonManagerSettings withHandOverRetryInterval(scala.concurrent.duration.FiniteDuration retryInterval)
-
withHandOverRetryInterval
public ClusterSingletonManagerSettings withHandOverRetryInterval(java.time.Duration retryInterval)
-
withLeaseSettings
public ClusterSingletonManagerSettings withLeaseSettings(LeaseUsageSettings leaseSettings)
-
-