Package akka.cluster.sharding.typed
Class ClusterShardingSettings
- java.lang.Object
-
- akka.cluster.sharding.typed.ClusterShardingSettings
-
public final class ClusterShardingSettings extends java.lang.Object
param: numberOfShards number of shards used by the defaultHashCodeMessageExtractor
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. If the given role does not match the role of the current node theShardRegion
will be started in proxy mode. param: dataCenter The data center of the cluster nodes where the cluster sharding is running. If the dataCenter is not specified then the same data center as current node. If the given dataCenter does not match the data center of the current node theShardRegion
will be started in proxy mode. 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: passivationStrategySettings settings for automatic passivation strategy, see descriptions in reference.conf 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: tuningParameters additional tuning parameters, see descriptions in reference.conf
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ClusterShardingSettings.PassivationStrategySettings
API MAY CHANGE: Settings for passivation strategies may change after additional testing and feedback.static class
ClusterShardingSettings.PassivationStrategySettings$
API MAY CHANGE: Settings for passivation strategies may change after additional testing and feedback.static interface
ClusterShardingSettings.RememberEntitiesStoreMode
static class
ClusterShardingSettings.RememberEntitiesStoreMode$
static class
ClusterShardingSettings.RememberEntitiesStoreModeDData$
static class
ClusterShardingSettings.RememberEntitiesStoreModeEventSourced$
static interface
ClusterShardingSettings.StateStoreMode
static class
ClusterShardingSettings.StateStoreMode$
static class
ClusterShardingSettings.StateStoreModeDData$
static class
ClusterShardingSettings.StateStoreModePersistence$
static class
ClusterShardingSettings.TuningParameters
-
Constructor Summary
Constructors Constructor Description ClusterShardingSettings(int numberOfShards, scala.Option<java.lang.String> role, scala.Option<java.lang.String> dataCenter, boolean rememberEntities, java.lang.String journalPluginId, java.lang.String snapshotPluginId, ClusterShardingSettings.PassivationStrategySettings passivationStrategySettings, scala.concurrent.duration.FiniteDuration shardRegionQueryTimeout, ClusterShardingSettings.StateStoreMode stateStoreMode, ClusterShardingSettings.RememberEntitiesStoreMode rememberEntitiesStoreMode, ClusterShardingSettings.TuningParameters tuningParameters, boolean coordinatorSingletonOverrideRole, ClusterSingletonManagerSettings coordinatorSingletonSettings, scala.Option<LeaseUsageSettings> leaseSettings)
ClusterShardingSettings(int numberOfShards, scala.Option<java.lang.String> role, scala.Option<java.lang.String> dataCenter, boolean rememberEntities, java.lang.String journalPluginId, java.lang.String snapshotPluginId, ClusterShardingSettings.PassivationStrategySettings passivationStrategySettings, scala.concurrent.duration.FiniteDuration shardRegionQueryTimeout, ClusterShardingSettings.StateStoreMode stateStoreMode, ClusterShardingSettings.RememberEntitiesStoreMode rememberEntitiesStoreMode, ClusterShardingSettings.TuningParameters tuningParameters, ClusterSingletonManagerSettings coordinatorSingletonSettings, scala.Option<LeaseUsageSettings> leaseSettings)
Deprecated.Use constructor with coordinatorSingletonOverrideRole.ClusterShardingSettings(int numberOfShards, scala.Option<java.lang.String> role, scala.Option<java.lang.String> dataCenter, boolean rememberEntities, java.lang.String journalPluginId, java.lang.String snapshotPluginId, scala.concurrent.duration.FiniteDuration passivateIdleEntityAfter, scala.concurrent.duration.FiniteDuration shardRegionQueryTimeout, ClusterShardingSettings.StateStoreMode stateStoreMode, ClusterShardingSettings.RememberEntitiesStoreMode rememberEntitiesStoreMode, ClusterShardingSettings.TuningParameters tuningParameters, ClusterSingletonManagerSettings coordinatorSingletonSettings)
Deprecated.Use constructor with leaseSettings.ClusterShardingSettings(int numberOfShards, scala.Option<java.lang.String> role, scala.Option<java.lang.String> dataCenter, boolean rememberEntities, java.lang.String journalPluginId, java.lang.String snapshotPluginId, scala.concurrent.duration.FiniteDuration passivateIdleEntityAfter, scala.concurrent.duration.FiniteDuration shardRegionQueryTimeout, ClusterShardingSettings.StateStoreMode stateStoreMode, ClusterShardingSettings.RememberEntitiesStoreMode rememberEntitiesStoreMode, ClusterShardingSettings.TuningParameters tuningParameters, ClusterSingletonManagerSettings coordinatorSingletonSettings, scala.Option<LeaseUsageSettings> leaseSettings)
Deprecated.Use constructor with passivationStrategySettings.ClusterShardingSettings(int numberOfShards, scala.Option<java.lang.String> role, scala.Option<java.lang.String> dataCenter, boolean rememberEntities, java.lang.String journalPluginId, java.lang.String snapshotPluginId, scala.concurrent.duration.FiniteDuration passivateIdleEntityAfter, scala.concurrent.duration.FiniteDuration shardRegionQueryTimeout, ClusterShardingSettings.StateStoreMode stateStoreMode, ClusterShardingSettings.TuningParameters tuningParameters, ClusterSingletonManagerSettings coordinatorSingletonSettings)
Deprecated.Use constructor with rememberEntitiesStoreMode.
-
Method Summary
-
-
-
Constructor Detail
-
ClusterShardingSettings
public ClusterShardingSettings(int numberOfShards, scala.Option<java.lang.String> role, scala.Option<java.lang.String> dataCenter, boolean rememberEntities, java.lang.String journalPluginId, java.lang.String snapshotPluginId, ClusterShardingSettings.PassivationStrategySettings passivationStrategySettings, scala.concurrent.duration.FiniteDuration shardRegionQueryTimeout, ClusterShardingSettings.StateStoreMode stateStoreMode, ClusterShardingSettings.RememberEntitiesStoreMode rememberEntitiesStoreMode, ClusterShardingSettings.TuningParameters tuningParameters, boolean coordinatorSingletonOverrideRole, ClusterSingletonManagerSettings coordinatorSingletonSettings, scala.Option<LeaseUsageSettings> leaseSettings)
-
ClusterShardingSettings
public ClusterShardingSettings(int numberOfShards, scala.Option<java.lang.String> role, scala.Option<java.lang.String> dataCenter, boolean rememberEntities, java.lang.String journalPluginId, java.lang.String snapshotPluginId, ClusterShardingSettings.PassivationStrategySettings passivationStrategySettings, scala.concurrent.duration.FiniteDuration shardRegionQueryTimeout, ClusterShardingSettings.StateStoreMode stateStoreMode, ClusterShardingSettings.RememberEntitiesStoreMode rememberEntitiesStoreMode, ClusterShardingSettings.TuningParameters tuningParameters, ClusterSingletonManagerSettings coordinatorSingletonSettings, scala.Option<LeaseUsageSettings> leaseSettings)
Deprecated.Use constructor with coordinatorSingletonOverrideRole. Since 2.6.20.
-
ClusterShardingSettings
public ClusterShardingSettings(int numberOfShards, scala.Option<java.lang.String> role, scala.Option<java.lang.String> dataCenter, boolean rememberEntities, java.lang.String journalPluginId, java.lang.String snapshotPluginId, scala.concurrent.duration.FiniteDuration passivateIdleEntityAfter, scala.concurrent.duration.FiniteDuration shardRegionQueryTimeout, ClusterShardingSettings.StateStoreMode stateStoreMode, ClusterShardingSettings.RememberEntitiesStoreMode rememberEntitiesStoreMode, ClusterShardingSettings.TuningParameters tuningParameters, ClusterSingletonManagerSettings coordinatorSingletonSettings, scala.Option<LeaseUsageSettings> leaseSettings)
Deprecated.Use constructor with passivationStrategySettings. Since 2.6.18.
-
ClusterShardingSettings
public ClusterShardingSettings(int numberOfShards, scala.Option<java.lang.String> role, scala.Option<java.lang.String> dataCenter, boolean rememberEntities, java.lang.String journalPluginId, java.lang.String snapshotPluginId, scala.concurrent.duration.FiniteDuration passivateIdleEntityAfter, scala.concurrent.duration.FiniteDuration shardRegionQueryTimeout, ClusterShardingSettings.StateStoreMode stateStoreMode, ClusterShardingSettings.RememberEntitiesStoreMode rememberEntitiesStoreMode, ClusterShardingSettings.TuningParameters tuningParameters, ClusterSingletonManagerSettings coordinatorSingletonSettings)
Deprecated.Use constructor with leaseSettings. Since 2.6.11.
-
ClusterShardingSettings
public ClusterShardingSettings(int numberOfShards, scala.Option<java.lang.String> role, scala.Option<java.lang.String> dataCenter, boolean rememberEntities, java.lang.String journalPluginId, java.lang.String snapshotPluginId, scala.concurrent.duration.FiniteDuration passivateIdleEntityAfter, scala.concurrent.duration.FiniteDuration shardRegionQueryTimeout, ClusterShardingSettings.StateStoreMode stateStoreMode, ClusterShardingSettings.TuningParameters tuningParameters, ClusterSingletonManagerSettings coordinatorSingletonSettings)
Deprecated.Use constructor with rememberEntitiesStoreMode. Since 2.6.6.
-
-
Method Detail
-
apply
public static ClusterShardingSettings apply(ActorSystem<?> system)
Scala API: Creates new cluster sharding settings object
-
fromConfig
public static ClusterShardingSettings fromConfig(com.typesafe.config.Config config)
-
create
public static ClusterShardingSettings create(ActorSystem<?> system)
Java API: Creates new cluster sharding settings object
-
stateStoreModePersistence
public static ClusterShardingSettings.StateStoreMode stateStoreModePersistence()
Java API
-
stateStoreModeDdata
public static ClusterShardingSettings.StateStoreMode stateStoreModeDdata()
Java API
-
rememberEntitiesStoreModeEventSourced
public static ClusterShardingSettings.RememberEntitiesStoreMode rememberEntitiesStoreModeEventSourced()
Java API
-
rememberEntitiesStoreModeDdata
public static ClusterShardingSettings.RememberEntitiesStoreMode rememberEntitiesStoreModeDdata()
Java API
-
numberOfShards
public int numberOfShards()
-
role
public scala.Option<java.lang.String> role()
-
dataCenter
public scala.Option<java.lang.String> dataCenter()
-
rememberEntities
public boolean rememberEntities()
-
journalPluginId
public java.lang.String journalPluginId()
-
snapshotPluginId
public java.lang.String snapshotPluginId()
-
passivationStrategySettings
public ClusterShardingSettings.PassivationStrategySettings passivationStrategySettings()
-
shardRegionQueryTimeout
public scala.concurrent.duration.FiniteDuration shardRegionQueryTimeout()
-
stateStoreMode
public ClusterShardingSettings.StateStoreMode stateStoreMode()
-
rememberEntitiesStoreMode
public ClusterShardingSettings.RememberEntitiesStoreMode rememberEntitiesStoreMode()
-
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)
-
withDataCenter
public ClusterShardingSettings withDataCenter(java.lang.String dataCenter)
-
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(ClusterShardingSettings.StateStoreMode stateStoreMode)
-
withRememberEntitiesStoreMode
public ClusterShardingSettings withRememberEntitiesStoreMode(ClusterShardingSettings.RememberEntitiesStoreMode rememberEntitiesStoreMode)
-
passivateIdleEntityAfter
public scala.concurrent.duration.FiniteDuration passivateIdleEntityAfter()
Deprecated.See passivationStrategySettings.idleEntitySettings instead. Since 2.6.18.
-
withPassivateIdleEntityAfter
public ClusterShardingSettings withPassivateIdleEntityAfter(scala.concurrent.duration.FiniteDuration duration)
Deprecated.Use withPassivationStrategy instead. Since 2.6.18.
-
withPassivateIdleEntityAfter
public ClusterShardingSettings withPassivateIdleEntityAfter(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
.
-
-