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 therole
anddataCenter
are matching.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description 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, 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 ClusterShardingSettings
apply(ActorSystem<?> system)
ClusterSingletonManagerSettings
coordinatorSingletonSettings()
static ClusterShardingSettings
create(ActorSystem<?> system)
Java API: Creates new cluster sharding settings objectscala.Option<java.lang.String>
dataCenter()
static ClusterShardingSettings
fromConfig(com.typesafe.config.Config config)
static ClusterShardingSettings
fromUntypedSettings(int numberOfShards, ClusterShardingSettings untypedSettings)
INTERNAL API: Indended only for internal use, it is not recommended to keep converting between the setting typesjava.lang.String
journalPluginId()
int
numberOfShards()
scala.concurrent.duration.FiniteDuration
passivateIdleEntityAfter()
boolean
rememberEntities()
scala.Option<java.lang.String>
role()
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.java.lang.String
snapshotPluginId()
ClusterShardingSettings.StateStoreMode
stateStoreMode()
static ClusterShardingSettings
toClassicSettings(ClusterShardingSettings settings)
INTERNAL API: Indended only for internal use, it is not recommended to keep converting between the setting typesClusterShardingSettings.TuningParameters
tuningParameters()
ClusterShardingSettings
withCoordinatorSingletonSettings(ClusterSingletonManagerSettings coordinatorSingletonSettings)
Therole
of theClusterSingletonManagerSettings
is not used.ClusterShardingSettings
withDataCenter(java.lang.String dataCenter)
ClusterShardingSettings
withJournalPluginId(java.lang.String journalPluginId)
ClusterShardingSettings
withPassivateIdleEntitiesAfter(scala.concurrent.duration.FiniteDuration duration)
ClusterShardingSettings
withPassivateIdleEntityAfter(java.time.Duration duration)
ClusterShardingSettings
withRememberEntities(boolean rememberEntities)
ClusterShardingSettings
withRole(java.lang.String role)
ClusterShardingSettings
withSnapshotPluginId(java.lang.String snapshotPluginId)
ClusterShardingSettings
withStateStoreMode(ClusterShardingSettings.StateStoreMode stateStoreMode)
ClusterShardingSettings
withTuningParameters(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 therole
anddataCenter
are 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)
Therole
of theClusterSingletonManagerSettings
is not used. Therole
of the coordinator singleton will be the same as therole
ofClusterShardingSettings
.- Parameters:
coordinatorSingletonSettings
- (undocumented)- Returns:
- (undocumented)
-
-