Package akka.cluster.typed
Class ClusterSingletonSettings
- java.lang.Object
-
- akka.cluster.typed.ClusterSingletonSettings
-
public final class ClusterSingletonSettings extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description ClusterSingletonSettings(scala.Option<java.lang.String> role, scala.Option<java.lang.String> dataCenter, scala.concurrent.duration.FiniteDuration singletonIdentificationInterval, scala.concurrent.duration.FiniteDuration removalMargin, scala.concurrent.duration.FiniteDuration handOverRetryInterval, int bufferSize)
Deprecated.Use constructor with leaseSettings.ClusterSingletonSettings(scala.Option<java.lang.String> role, scala.Option<java.lang.String> dataCenter, scala.concurrent.duration.FiniteDuration singletonIdentificationInterval, scala.concurrent.duration.FiniteDuration removalMargin, scala.concurrent.duration.FiniteDuration handOverRetryInterval, int bufferSize, scala.Option<LeaseUsageSettings> leaseSettings)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static ClusterSingletonSettings
apply(ActorSystem<?> system)
int
bufferSize()
static ClusterSingletonSettings
create(ActorSystem<?> system)
Java APIscala.Option<java.lang.String>
dataCenter()
Deprecated.Use Akka Distributed Cluster instead.static ClusterSingletonSettings
fromConfig(com.typesafe.config.Config config)
scala.concurrent.duration.FiniteDuration
handOverRetryInterval()
scala.Option<LeaseUsageSettings>
leaseSettings()
scala.concurrent.duration.FiniteDuration
removalMargin()
scala.Option<java.lang.String>
role()
scala.concurrent.duration.FiniteDuration
singletonIdentificationInterval()
java.lang.String
toString()
ClusterSingletonSettings
withBufferSize(int bufferSize)
ClusterSingletonSettings
withDataCenter(java.lang.String dataCenter)
Deprecated.Use Akka Distributed Cluster instead.ClusterSingletonSettings
withHandoverRetryInterval(java.time.Duration handOverRetryInterval)
ClusterSingletonSettings
withHandoverRetryInterval(scala.concurrent.duration.FiniteDuration handOverRetryInterval)
ClusterSingletonSettings
withLeaseSettings(LeaseUsageSettings leaseSettings)
Note that if you define a custom lease name and have several singletons each one must have a unique lease name.ClusterSingletonSettings
withNoDataCenter()
Deprecated.Use Akka Distributed Cluster instead.ClusterSingletonSettings
withNoRole()
ClusterSingletonSettings
withRemovalMargin(java.time.Duration removalMargin)
ClusterSingletonSettings
withRemovalMargin(scala.concurrent.duration.FiniteDuration removalMargin)
ClusterSingletonSettings
withRole(java.lang.String role)
-
-
-
Constructor Detail
-
ClusterSingletonSettings
public ClusterSingletonSettings(scala.Option<java.lang.String> role, scala.Option<java.lang.String> dataCenter, scala.concurrent.duration.FiniteDuration singletonIdentificationInterval, scala.concurrent.duration.FiniteDuration removalMargin, scala.concurrent.duration.FiniteDuration handOverRetryInterval, int bufferSize, scala.Option<LeaseUsageSettings> leaseSettings)
-
ClusterSingletonSettings
public ClusterSingletonSettings(scala.Option<java.lang.String> role, scala.Option<java.lang.String> dataCenter, scala.concurrent.duration.FiniteDuration singletonIdentificationInterval, scala.concurrent.duration.FiniteDuration removalMargin, scala.concurrent.duration.FiniteDuration handOverRetryInterval, int bufferSize)
Deprecated.Use constructor with leaseSettings. Since 2.6.15.
-
-
Method Detail
-
apply
public static ClusterSingletonSettings apply(ActorSystem<?> system)
-
create
public static ClusterSingletonSettings create(ActorSystem<?> system)
Java API
-
fromConfig
public static ClusterSingletonSettings fromConfig(com.typesafe.config.Config config)
-
role
public scala.Option<java.lang.String> role()
-
dataCenter
public scala.Option<java.lang.String> dataCenter()
Deprecated.Use Akka Distributed Cluster instead. Since 2.10.0.
-
singletonIdentificationInterval
public scala.concurrent.duration.FiniteDuration singletonIdentificationInterval()
-
removalMargin
public scala.concurrent.duration.FiniteDuration removalMargin()
-
handOverRetryInterval
public scala.concurrent.duration.FiniteDuration handOverRetryInterval()
-
bufferSize
public int bufferSize()
-
leaseSettings
public scala.Option<LeaseUsageSettings> leaseSettings()
-
withRole
public ClusterSingletonSettings withRole(java.lang.String role)
-
withNoRole
public ClusterSingletonSettings withNoRole()
-
withDataCenter
public ClusterSingletonSettings withDataCenter(java.lang.String dataCenter)
Deprecated.Use Akka Distributed Cluster instead. Since 2.10.0.
-
withNoDataCenter
public ClusterSingletonSettings withNoDataCenter()
Deprecated.Use Akka Distributed Cluster instead. Since 2.10.0.
-
withRemovalMargin
public ClusterSingletonSettings withRemovalMargin(scala.concurrent.duration.FiniteDuration removalMargin)
-
withRemovalMargin
public ClusterSingletonSettings withRemovalMargin(java.time.Duration removalMargin)
-
withHandoverRetryInterval
public ClusterSingletonSettings withHandoverRetryInterval(scala.concurrent.duration.FiniteDuration handOverRetryInterval)
-
withHandoverRetryInterval
public ClusterSingletonSettings withHandoverRetryInterval(java.time.Duration handOverRetryInterval)
-
withBufferSize
public ClusterSingletonSettings withBufferSize(int bufferSize)
-
withLeaseSettings
public ClusterSingletonSettings withLeaseSettings(LeaseUsageSettings leaseSettings)
Note that if you define a custom lease name and have several singletons each one must have a unique lease name. If the lease name is undefined it will be derived from ActorSystem name and singleton actor path, but that may result in too long lease names.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-