Package akka.cluster.sharding.typed
Class ClusterShardingSettings
- java.lang.Object
-
- akka.cluster.sharding.typed.ClusterShardingSettings
-
- All Implemented Interfaces:
NoSerializationVerificationNeeded
public final class ClusterShardingSettings extends java.lang.Object implements NoSerializationVerificationNeeded
INTERNAL API If true, this node should run the shard region, otherwise just a shard proxy should started on this node. It's checking if theroleanddataCenterare matching.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceClusterShardingSettings.StateStoreModestatic classClusterShardingSettings.StateStoreMode$static classClusterShardingSettings.StateStoreModeDData$static classClusterShardingSettings.StateStoreModePersistence$static classClusterShardingSettings.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, scala.concurrent.duration.FiniteDuration passivateIdleEntityAfter, ClusterShardingSettings.StateStoreMode stateStoreMode, ClusterShardingSettings.TuningParameters tuningParameters, ClusterSingletonManagerSettings coordinatorSingletonSettings)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ClusterShardingSettingsapply(ActorSystem<?> system)ClusterSingletonManagerSettingscoordinatorSingletonSettings()static ClusterShardingSettingscreate(ActorSystem<?> system)Java API: Creates new cluster sharding settings objectscala.Option<java.lang.String>dataCenter()static ClusterShardingSettingsfromConfig(com.typesafe.config.Config config)static ClusterShardingSettingsfromUntypedSettings(int numberOfShards, ClusterShardingSettings untypedSettings)INTERNAL API: Indended only for internal use, it is not recommended to keep converting between the setting typesjava.lang.StringjournalPluginId()intnumberOfShards()scala.concurrent.duration.FiniteDurationpassivateIdleEntityAfter()booleanrememberEntities()scala.Option<java.lang.String>role()booleanshouldHostShard(Cluster cluster)INTERNAL API If true, this node should run the shard region, otherwise just a shard proxy should started on this node.java.lang.StringsnapshotPluginId()ClusterShardingSettings.StateStoreModestateStoreMode()static ClusterShardingSettingstoClassicSettings(ClusterShardingSettings settings)INTERNAL API: Indended only for internal use, it is not recommended to keep converting between the setting typesClusterShardingSettings.TuningParameterstuningParameters()ClusterShardingSettingswithCoordinatorSingletonSettings(ClusterSingletonManagerSettings coordinatorSingletonSettings)Theroleof theClusterSingletonManagerSettingsis not used.ClusterShardingSettingswithDataCenter(java.lang.String dataCenter)ClusterShardingSettingswithJournalPluginId(java.lang.String journalPluginId)ClusterShardingSettingswithPassivateIdleEntitiesAfter(scala.concurrent.duration.FiniteDuration duration)ClusterShardingSettingswithPassivateIdleEntityAfter(java.time.Duration duration)ClusterShardingSettingswithRememberEntities(boolean rememberEntities)ClusterShardingSettingswithRole(java.lang.String role)ClusterShardingSettingswithSnapshotPluginId(java.lang.String snapshotPluginId)ClusterShardingSettingswithStateStoreMode(ClusterShardingSettings.StateStoreMode stateStoreMode)ClusterShardingSettingswithTuningParameters(ClusterShardingSettings.TuningParameters tuningParameters)
-
-
-
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, scala.concurrent.duration.FiniteDuration passivateIdleEntityAfter, ClusterShardingSettings.StateStoreMode stateStoreMode, ClusterShardingSettings.TuningParameters tuningParameters, ClusterSingletonManagerSettings coordinatorSingletonSettings)
-
-
Method Detail
-
apply
public static ClusterShardingSettings apply(ActorSystem<?> system)
-
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
-
fromUntypedSettings
public static ClusterShardingSettings fromUntypedSettings(int numberOfShards, ClusterShardingSettings untypedSettings)
INTERNAL API: Indended only for internal use, it is not recommended to keep converting between the setting types
-
toClassicSettings
public static ClusterShardingSettings toClassicSettings(ClusterShardingSettings settings)
INTERNAL API: Indended only for internal use, it is not recommended to keep converting between the setting types
-
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()
-
passivateIdleEntityAfter
public scala.concurrent.duration.FiniteDuration passivateIdleEntityAfter()
-
stateStoreMode
public ClusterShardingSettings.StateStoreMode stateStoreMode()
-
tuningParameters
public ClusterShardingSettings.TuningParameters tuningParameters()
-
coordinatorSingletonSettings
public ClusterSingletonManagerSettings coordinatorSingletonSettings()
-
shouldHostShard
public boolean shouldHostShard(Cluster cluster)
INTERNAL API If true, this node should run the shard region, otherwise just a shard proxy should started on this node. It's checking if theroleanddataCenterare matching.- Parameters:
cluster- (undocumented)- Returns:
- (undocumented)
-
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)
-
withPassivateIdleEntitiesAfter
public ClusterShardingSettings withPassivateIdleEntitiesAfter(scala.concurrent.duration.FiniteDuration duration)
-
withPassivateIdleEntityAfter
public ClusterShardingSettings withPassivateIdleEntityAfter(java.time.Duration duration)
-
withCoordinatorSingletonSettings
public ClusterShardingSettings withCoordinatorSingletonSettings(ClusterSingletonManagerSettings coordinatorSingletonSettings)
Theroleof theClusterSingletonManagerSettingsis not used. Theroleof the coordinator singleton will be the same as theroleofClusterShardingSettings.- Parameters:
coordinatorSingletonSettings- (undocumented)- Returns:
- (undocumented)
-
-