Class ClusterShardingSettings
java.lang.Object
org.apache.pekko.cluster.sharding.ClusterShardingSettings
- All Implemented Interfaces:
NoSerializationVerificationNeeded
public final class ClusterShardingSettings
extends 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 upon
Shard
restart. i.e. if the Shard is started on a different ShardRegion 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
Nested ClassesModifier and TypeClassDescriptionstatic classINTERNAL APIstatic classINTERNAL APIstatic classINTERNAL APIstatic classINTERNAL APIstatic classstatic classINTERNAL APIstatic interfaceINTERNAL APIstatic classINTERNAL API Determine the passivation strategy to use from settings.static final classAPI MAY CHANGE: Settings for passivation strategies may change after additional testing and feedback.static classAPI MAY CHANGE: Settings for passivation strategies may change after additional testing and feedback.static class -
Constructor Summary
ConstructorsConstructorDescriptionClusterShardingSettings(scala.Option<String> role, boolean rememberEntities, String journalPluginId, String snapshotPluginId, String stateStoreMode, String rememberEntitiesStore, ClusterShardingSettings.PassivationStrategySettings passivationStrategySettings, scala.concurrent.duration.FiniteDuration shardRegionQueryTimeout, ClusterShardingSettings.TuningParameters tuningParameters, boolean coordinatorSingletonOverrideRole, ClusterSingletonManagerSettings coordinatorSingletonSettings, scala.Option<LeaseUsageSettings> leaseSettings) -
Method Summary
Modifier and TypeMethodDescriptionstatic ClusterShardingSettingsapply(com.typesafe.config.Config config) Create settings from a configuration with the same layout as the default configurationpekko.cluster.sharding.static ClusterShardingSettingsapply(ActorSystem system) Create settings from the default configurationpekko.cluster.sharding.booleanstatic ClusterShardingSettingscreate(com.typesafe.config.Config config) Java API: Create settings from a configuration with the same layout as the default configurationpekko.cluster.sharding.static ClusterShardingSettingscreate(ActorSystem system) Java API: Create settings from the default configurationpekko.cluster.sharding.scala.Option<LeaseUsageSettings>booleanscala.Option<String>role()scala.concurrent.duration.FiniteDurationstatic Stringstatic StringwithCoordinatorSingletonSettings(ClusterSingletonManagerSettings coordinatorSingletonSettings) Theroleof theClusterSingletonManagerSettingsis not used.withJournalPluginId(String journalPluginId) withLeaseSettings(LeaseUsageSettings leaseSettings) API MAY CHANGE: Settings for passivation strategies may change after additional testing and feedback.withRememberEntities(boolean rememberEntities) withShardRegionQueryTimeout(Duration duration) withShardRegionQueryTimeout(scala.concurrent.duration.FiniteDuration duration) withSnapshotPluginId(String snapshotPluginId) withStateStoreMode(String stateStoreMode) withTuningParameters(ClusterShardingSettings.TuningParameters tuningParameters)
-
Constructor Details
-
ClusterShardingSettings
public ClusterShardingSettings(scala.Option<String> role, boolean rememberEntities, String journalPluginId, String snapshotPluginId, String stateStoreMode, String rememberEntitiesStore, ClusterShardingSettings.PassivationStrategySettings passivationStrategySettings, scala.concurrent.duration.FiniteDuration shardRegionQueryTimeout, ClusterShardingSettings.TuningParameters tuningParameters, boolean coordinatorSingletonOverrideRole, ClusterSingletonManagerSettings coordinatorSingletonSettings, scala.Option<LeaseUsageSettings> leaseSettings)
-
-
Method Details
-
StateStoreModePersistence
-
StateStoreModeDData
-
apply
Create settings from the default configurationpekko.cluster.sharding. -
apply
Create settings from a configuration with the same layout as the default configurationpekko.cluster.sharding. -
create
Java API: Create settings from the default configurationpekko.cluster.sharding. -
create
Java API: Create settings from a configuration with the same layout as the default configurationpekko.cluster.sharding. -
role
-
rememberEntities
public boolean rememberEntities() -
journalPluginId
-
snapshotPluginId
-
stateStoreMode
-
rememberEntitiesStore
-
passivationStrategySettings
-
shardRegionQueryTimeout
public scala.concurrent.duration.FiniteDuration shardRegionQueryTimeout() -
tuningParameters
-
coordinatorSingletonOverrideRole
public boolean coordinatorSingletonOverrideRole() -
coordinatorSingletonSettings
-
leaseSettings
-
withRole
-
withRole
-
withRememberEntities
-
withJournalPluginId
-
withSnapshotPluginId
-
withTuningParameters
public ClusterShardingSettings withTuningParameters(ClusterShardingSettings.TuningParameters tuningParameters) -
withStateStoreMode
-
withPassivationStrategy
public ClusterShardingSettings withPassivationStrategy(ClusterShardingSettings.PassivationStrategySettings settings) API MAY CHANGE: Settings for passivation strategies may change after additional testing and feedback. -
withNoPassivationStrategy
-
withShardRegionQueryTimeout
public ClusterShardingSettings withShardRegionQueryTimeout(scala.concurrent.duration.FiniteDuration duration) -
withShardRegionQueryTimeout
-
withLeaseSettings
-
withCoordinatorSingletonSettings
public ClusterShardingSettings withCoordinatorSingletonSettings(ClusterSingletonManagerSettings coordinatorSingletonSettings) Theroleof theClusterSingletonManagerSettingsis not used. Theroleof the coordinator singleton will be the same as theroleofClusterShardingSettings.
-