Class ClusterShardingSettings


  • public final class ClusterShardingSettings
    extends java.lang.Object
    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 the role and dataCenter are matching.
    • 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,
                                       scala.concurrent.duration.FiniteDuration shardRegionQueryTimeout,
                                       ClusterShardingSettings.StateStoreMode stateStoreMode,
                                       ClusterShardingSettings.TuningParameters tuningParameters,
                                       ClusterSingletonManagerSettings coordinatorSingletonSettings)
    • Method Detail

      • fromClassicSettings

        public static ClusterShardingSettings fromClassicSettings​(int numberOfShards,
                                                                  ClusterShardingSettings classicSettings)
        INTERNAL API: Intended 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()
      • shardRegionQueryTimeout

        public scala.concurrent.duration.FiniteDuration shardRegionQueryTimeout()
      • 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 the role and dataCenter are matching.
        Parameters:
        cluster - (undocumented)
        Returns:
        (undocumented)
      • withSnapshotPluginId

        public ClusterShardingSettings withSnapshotPluginId​(java.lang.String snapshotPluginId)
      • withPassivateIdleEntityAfter

        public ClusterShardingSettings withPassivateIdleEntityAfter​(scala.concurrent.duration.FiniteDuration duration)
      • withPassivateIdleEntityAfter

        public ClusterShardingSettings withPassivateIdleEntityAfter​(java.time.Duration duration)
      • withShardRegionQueryTimeout

        public ClusterShardingSettings withShardRegionQueryTimeout​(scala.concurrent.duration.FiniteDuration duration)
      • withShardRegionQueryTimeout

        public ClusterShardingSettings withShardRegionQueryTimeout​(java.time.Duration duration)
      • withCoordinatorSingletonSettings

        public ClusterShardingSettings withCoordinatorSingletonSettings​(ClusterSingletonManagerSettings coordinatorSingletonSettings)
        The role of the ClusterSingletonManagerSettings is not used. The role of the coordinator singleton will be the same as the role of ClusterShardingSettings.
        Parameters:
        coordinatorSingletonSettings - (undocumented)
        Returns:
        (undocumented)