Package akka.cluster.sharding
Class ClusterShardingSettings
- java.lang.Object
-
- akka.cluster.sharding.ClusterShardingSettings
-
- All Implemented Interfaces:
NoSerializationVerificationNeeded
public final class ClusterShardingSettings extends java.lang.Object implements NoSerializationVerificationNeeded
param: role specifies that this entity type requires cluster nodes with a specific role. If the role is not specified all nodes in the cluster are used. param: rememberEntities true if active entity actors shall be automatically restarted uponShard
restart. i.e. if theShard
is started on a differentShardRegion
due to rebalance or crash. param: journalPluginId Absolute path to the journal plugin configuration entity that is to be used for the internal persistence of ClusterSharding. If not defined the default journal plugin is used. Note that this is not related to persistence used by the entity actors. param: snapshotPluginId Absolute path to the snapshot plugin configuration entity that is to be used for the internal persistence of ClusterSharding. If not defined the default snapshot plugin is used. Note that this is not related to persistence used by the entity actors. param: passivationStrategySettings settings for automatic passivation strategy, see descriptions in reference.conf param: tuningParameters additional tuning parameters, see descriptions in reference.conf param: shardRegionQueryTimeout the timeout for querying a shard region, see descriptions in reference.conf
-
-
Nested Class Summary
-
Constructor Summary
Constructors Constructor Description ClusterShardingSettings(scala.Option<java.lang.String> role, boolean rememberEntities, java.lang.String journalPluginId, java.lang.String snapshotPluginId, java.lang.String stateStoreMode, ClusterShardingSettings.TuningParameters tuningParameters, ClusterSingletonManagerSettings coordinatorSingletonSettings)
Deprecated.Use the ClusterShardingSettings factory methods or the constructor including passivateIdleEntityAfter instead.ClusterShardingSettings(scala.Option<java.lang.String> role, boolean rememberEntities, java.lang.String journalPluginId, java.lang.String snapshotPluginId, java.lang.String stateStoreMode, java.lang.String rememberEntitiesStore, ClusterShardingSettings.PassivationStrategySettings passivationStrategySettings, scala.concurrent.duration.FiniteDuration shardRegionQueryTimeout, ClusterShardingSettings.TuningParameters tuningParameters, boolean coordinatorSingletonOverrideRole, ClusterSingletonManagerSettings coordinatorSingletonSettings, scala.Option<LeaseUsageSettings> leaseSettings)
ClusterShardingSettings(scala.Option<java.lang.String> role, boolean rememberEntities, java.lang.String journalPluginId, java.lang.String snapshotPluginId, java.lang.String stateStoreMode, java.lang.String rememberEntitiesStore, ClusterShardingSettings.PassivationStrategySettings passivationStrategySettings, scala.concurrent.duration.FiniteDuration shardRegionQueryTimeout, ClusterShardingSettings.TuningParameters tuningParameters, ClusterSingletonManagerSettings coordinatorSingletonSettings, scala.Option<LeaseUsageSettings> leaseSettings)
Deprecated.Use the ClusterShardingSettings factory methods or the constructor including coordinatorSingletonOverrideRole instead.ClusterShardingSettings(scala.Option<java.lang.String> role, boolean rememberEntities, java.lang.String journalPluginId, java.lang.String snapshotPluginId, java.lang.String stateStoreMode, java.lang.String rememberEntitiesStore, scala.concurrent.duration.FiniteDuration passivateIdleEntityAfter, scala.concurrent.duration.FiniteDuration shardRegionQueryTimeout, ClusterShardingSettings.TuningParameters tuningParameters, ClusterSingletonManagerSettings coordinatorSingletonSettings, scala.Option<LeaseUsageSettings> leaseSettings)
Deprecated.Use the ClusterShardingSettings factory methods or the constructor including passivationStrategySettings instead.ClusterShardingSettings(scala.Option<java.lang.String> role, boolean rememberEntities, java.lang.String journalPluginId, java.lang.String snapshotPluginId, java.lang.String stateStoreMode, scala.concurrent.duration.FiniteDuration passivateIdleEntityAfter, ClusterShardingSettings.TuningParameters tuningParameters, ClusterSingletonManagerSettings coordinatorSingletonSettings)
Deprecated.Use the ClusterShardingSettings factory methods or the constructor including shardRegionQueryTimeout instead.ClusterShardingSettings(scala.Option<java.lang.String> role, boolean rememberEntities, java.lang.String journalPluginId, java.lang.String snapshotPluginId, java.lang.String stateStoreMode, scala.concurrent.duration.FiniteDuration passivateIdleEntityAfter, ClusterShardingSettings.TuningParameters tuningParameters, ClusterSingletonManagerSettings coordinatorSingletonSettings, scala.Option<LeaseUsageSettings> leaseSettings)
Deprecated.Use the ClusterShardingSettings factory methods or the constructor including shardRegionQueryTimeout instead.ClusterShardingSettings(scala.Option<java.lang.String> role, boolean rememberEntities, java.lang.String journalPluginId, java.lang.String snapshotPluginId, java.lang.String stateStoreMode, scala.concurrent.duration.FiniteDuration passivateIdleEntityAfter, scala.concurrent.duration.FiniteDuration shardRegionQueryTimeout, ClusterShardingSettings.TuningParameters tuningParameters, ClusterSingletonManagerSettings coordinatorSingletonSettings, scala.Option<LeaseUsageSettings> leaseSettings)
Deprecated.Use the ClusterShardingSettings factory methods or the constructor including rememberedEntitiesStore instead.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static ClusterShardingSettings
apply(ActorSystem system)
Create settings from the default configurationakka.cluster.sharding
.static ClusterShardingSettings
apply(com.typesafe.config.Config config)
Create settings from a configuration with the same layout as the default configurationakka.cluster.sharding
.boolean
coordinatorSingletonOverrideRole()
ClusterSingletonManagerSettings
coordinatorSingletonSettings()
static ClusterShardingSettings
create(ActorSystem system)
Java API: Create settings from the default configurationakka.cluster.sharding
.static ClusterShardingSettings
create(com.typesafe.config.Config config)
Java API: Create settings from a configuration with the same layout as the default configurationakka.cluster.sharding
.java.lang.String
journalPluginId()
scala.Option<LeaseUsageSettings>
leaseSettings()
scala.concurrent.duration.FiniteDuration
passivateIdleEntityAfter()
Deprecated.See passivationStrategySettings.idleEntitySettings instead.ClusterShardingSettings.PassivationStrategySettings
passivationStrategySettings()
boolean
rememberEntities()
java.lang.String
rememberEntitiesStore()
scala.Option<java.lang.String>
role()
scala.concurrent.duration.FiniteDuration
shardRegionQueryTimeout()
java.lang.String
snapshotPluginId()
java.lang.String
stateStoreMode()
static java.lang.String
StateStoreModeDData()
static java.lang.String
StateStoreModePersistence()
ClusterShardingSettings.TuningParameters
tuningParameters()
ClusterShardingSettings
withCoordinatorSingletonSettings(ClusterSingletonManagerSettings coordinatorSingletonSettings)
Therole
of theClusterSingletonManagerSettings
is not used.ClusterShardingSettings
withJournalPluginId(java.lang.String journalPluginId)
ClusterShardingSettings
withLeaseSettings(LeaseUsageSettings leaseSettings)
ClusterShardingSettings
withNoPassivationStrategy()
ClusterShardingSettings
withPassivateIdleAfter(java.time.Duration duration)
Deprecated.Use withPassivationStrategy instead.ClusterShardingSettings
withPassivateIdleAfter(scala.concurrent.duration.FiniteDuration duration)
Deprecated.Use withPassivationStrategy instead.ClusterShardingSettings
withPassivationStrategy(ClusterShardingSettings.PassivationStrategySettings settings)
API MAY CHANGE: Settings for passivation strategies may change after additional testing and feedback.ClusterShardingSettings
withRememberEntities(boolean rememberEntities)
ClusterShardingSettings
withRole(java.lang.String role)
ClusterShardingSettings
withRole(scala.Option<java.lang.String> role)
ClusterShardingSettings
withShardRegionQueryTimeout(java.time.Duration duration)
ClusterShardingSettings
withShardRegionQueryTimeout(scala.concurrent.duration.FiniteDuration duration)
ClusterShardingSettings
withSnapshotPluginId(java.lang.String snapshotPluginId)
ClusterShardingSettings
withStateStoreMode(java.lang.String stateStoreMode)
ClusterShardingSettings
withTuningParameters(ClusterShardingSettings.TuningParameters tuningParameters)
-
-
-
Constructor Detail
-
ClusterShardingSettings
public ClusterShardingSettings(scala.Option<java.lang.String> role, boolean rememberEntities, java.lang.String journalPluginId, java.lang.String snapshotPluginId, java.lang.String stateStoreMode, java.lang.String rememberEntitiesStore, ClusterShardingSettings.PassivationStrategySettings passivationStrategySettings, scala.concurrent.duration.FiniteDuration shardRegionQueryTimeout, ClusterShardingSettings.TuningParameters tuningParameters, boolean coordinatorSingletonOverrideRole, ClusterSingletonManagerSettings coordinatorSingletonSettings, scala.Option<LeaseUsageSettings> leaseSettings)
-
ClusterShardingSettings
public ClusterShardingSettings(scala.Option<java.lang.String> role, boolean rememberEntities, java.lang.String journalPluginId, java.lang.String snapshotPluginId, java.lang.String stateStoreMode, java.lang.String rememberEntitiesStore, ClusterShardingSettings.PassivationStrategySettings passivationStrategySettings, scala.concurrent.duration.FiniteDuration shardRegionQueryTimeout, ClusterShardingSettings.TuningParameters tuningParameters, ClusterSingletonManagerSettings coordinatorSingletonSettings, scala.Option<LeaseUsageSettings> leaseSettings)
Deprecated.Use the ClusterShardingSettings factory methods or the constructor including coordinatorSingletonOverrideRole instead. Since 2.6.20.
-
ClusterShardingSettings
public ClusterShardingSettings(scala.Option<java.lang.String> role, boolean rememberEntities, java.lang.String journalPluginId, java.lang.String snapshotPluginId, java.lang.String stateStoreMode, java.lang.String rememberEntitiesStore, scala.concurrent.duration.FiniteDuration passivateIdleEntityAfter, scala.concurrent.duration.FiniteDuration shardRegionQueryTimeout, ClusterShardingSettings.TuningParameters tuningParameters, ClusterSingletonManagerSettings coordinatorSingletonSettings, scala.Option<LeaseUsageSettings> leaseSettings)
Deprecated.Use the ClusterShardingSettings factory methods or the constructor including passivationStrategySettings instead. Since 2.6.18.
-
ClusterShardingSettings
public ClusterShardingSettings(scala.Option<java.lang.String> role, boolean rememberEntities, java.lang.String journalPluginId, java.lang.String snapshotPluginId, java.lang.String stateStoreMode, scala.concurrent.duration.FiniteDuration passivateIdleEntityAfter, scala.concurrent.duration.FiniteDuration shardRegionQueryTimeout, ClusterShardingSettings.TuningParameters tuningParameters, ClusterSingletonManagerSettings coordinatorSingletonSettings, scala.Option<LeaseUsageSettings> leaseSettings)
Deprecated.Use the ClusterShardingSettings factory methods or the constructor including rememberedEntitiesStore instead. Since 2.6.7.
-
ClusterShardingSettings
public ClusterShardingSettings(scala.Option<java.lang.String> role, boolean rememberEntities, java.lang.String journalPluginId, java.lang.String snapshotPluginId, java.lang.String stateStoreMode, scala.concurrent.duration.FiniteDuration passivateIdleEntityAfter, ClusterShardingSettings.TuningParameters tuningParameters, ClusterSingletonManagerSettings coordinatorSingletonSettings, scala.Option<LeaseUsageSettings> leaseSettings)
Deprecated.Use the ClusterShardingSettings factory methods or the constructor including shardRegionQueryTimeout instead. Since 2.6.0.
-
ClusterShardingSettings
public ClusterShardingSettings(scala.Option<java.lang.String> role, boolean rememberEntities, java.lang.String journalPluginId, java.lang.String snapshotPluginId, java.lang.String stateStoreMode, scala.concurrent.duration.FiniteDuration passivateIdleEntityAfter, ClusterShardingSettings.TuningParameters tuningParameters, ClusterSingletonManagerSettings coordinatorSingletonSettings)
Deprecated.Use the ClusterShardingSettings factory methods or the constructor including shardRegionQueryTimeout instead. Since 2.5.21.
-
ClusterShardingSettings
public ClusterShardingSettings(scala.Option<java.lang.String> role, boolean rememberEntities, java.lang.String journalPluginId, java.lang.String snapshotPluginId, java.lang.String stateStoreMode, ClusterShardingSettings.TuningParameters tuningParameters, ClusterSingletonManagerSettings coordinatorSingletonSettings)
Deprecated.Use the ClusterShardingSettings factory methods or the constructor including passivateIdleEntityAfter instead. Since 2.5.18.
-
-
Method Detail
-
StateStoreModePersistence
public static java.lang.String StateStoreModePersistence()
-
StateStoreModeDData
public static java.lang.String StateStoreModeDData()
-
apply
public static ClusterShardingSettings apply(ActorSystem system)
Create settings from the default configurationakka.cluster.sharding
.
-
apply
public static ClusterShardingSettings apply(com.typesafe.config.Config config)
Create settings from a configuration with the same layout as the default configurationakka.cluster.sharding
.
-
create
public static ClusterShardingSettings create(ActorSystem system)
Java API: Create settings from the default configurationakka.cluster.sharding
.
-
create
public static ClusterShardingSettings create(com.typesafe.config.Config config)
Java API: Create settings from a configuration with the same layout as the default configurationakka.cluster.sharding
.
-
role
public scala.Option<java.lang.String> role()
-
rememberEntities
public boolean rememberEntities()
-
journalPluginId
public java.lang.String journalPluginId()
-
snapshotPluginId
public java.lang.String snapshotPluginId()
-
stateStoreMode
public java.lang.String stateStoreMode()
-
rememberEntitiesStore
public java.lang.String rememberEntitiesStore()
-
passivationStrategySettings
public ClusterShardingSettings.PassivationStrategySettings passivationStrategySettings()
-
shardRegionQueryTimeout
public scala.concurrent.duration.FiniteDuration shardRegionQueryTimeout()
-
tuningParameters
public ClusterShardingSettings.TuningParameters tuningParameters()
-
coordinatorSingletonOverrideRole
public boolean coordinatorSingletonOverrideRole()
-
coordinatorSingletonSettings
public ClusterSingletonManagerSettings coordinatorSingletonSettings()
-
leaseSettings
public scala.Option<LeaseUsageSettings> leaseSettings()
-
withRole
public ClusterShardingSettings withRole(java.lang.String role)
-
withRole
public ClusterShardingSettings withRole(scala.Option<java.lang.String> role)
-
withRememberEntities
public ClusterShardingSettings withRememberEntities(boolean rememberEntities)
-
withJournalPluginId
public ClusterShardingSettings withJournalPluginId(java.lang.String journalPluginId)
-
withSnapshotPluginId
public ClusterShardingSettings withSnapshotPluginId(java.lang.String snapshotPluginId)
-
withTuningParameters
public ClusterShardingSettings withTuningParameters(ClusterShardingSettings.TuningParameters tuningParameters)
-
withStateStoreMode
public ClusterShardingSettings withStateStoreMode(java.lang.String stateStoreMode)
-
passivateIdleEntityAfter
public scala.concurrent.duration.FiniteDuration passivateIdleEntityAfter()
Deprecated.See passivationStrategySettings.idleEntitySettings instead. Since 2.6.18.
-
withPassivateIdleAfter
public ClusterShardingSettings withPassivateIdleAfter(scala.concurrent.duration.FiniteDuration duration)
Deprecated.Use withPassivationStrategy instead. Since 2.6.18.
-
withPassivateIdleAfter
public ClusterShardingSettings withPassivateIdleAfter(java.time.Duration duration)
Deprecated.Use withPassivationStrategy instead. Since 2.6.18.
-
withPassivationStrategy
public ClusterShardingSettings withPassivationStrategy(ClusterShardingSettings.PassivationStrategySettings settings)
API MAY CHANGE: Settings for passivation strategies may change after additional testing and feedback.
-
withNoPassivationStrategy
public ClusterShardingSettings withNoPassivationStrategy()
-
withShardRegionQueryTimeout
public ClusterShardingSettings withShardRegionQueryTimeout(scala.concurrent.duration.FiniteDuration duration)
-
withShardRegionQueryTimeout
public ClusterShardingSettings withShardRegionQueryTimeout(java.time.Duration duration)
-
withLeaseSettings
public ClusterShardingSettings withLeaseSettings(LeaseUsageSettings leaseSettings)
-
withCoordinatorSingletonSettings
public ClusterShardingSettings withCoordinatorSingletonSettings(ClusterSingletonManagerSettings coordinatorSingletonSettings)
Therole
of theClusterSingletonManagerSettings
is not used. Therole
of the coordinator singleton will be the same as therole
ofClusterShardingSettings
.
-
-