Class LocalShardCoordinator

  • All Implemented Interfaces:
    ShardCoordinator

    public class LocalShardCoordinator
    extends Object
    implements ShardCoordinator
    A centralized local ShardCoordinator that can operate on a single JVM instance to coordinate Gateway connection and identifying attempts across multiple shards.
    • Method Detail

      • publishConnected

        public Mono<Void> publishConnected​(ShardInfo shardInfo)
        Description copied from interface: ShardCoordinator
        Notifies this coordinator that a given shard has connected successfully. Can be used to signal other shards for authentication.
        Specified by:
        publishConnected in interface ShardCoordinator
        Parameters:
        shardInfo - the connected shard details
        Returns:
        a Mono indicating when this operation has completed
      • publishDisconnected

        public Mono<Void> publishDisconnected​(ShardInfo shardInfo,
                                              SessionInfo sessionInfo)
        Description copied from interface: ShardCoordinator
        Notifies this coordinator that a given shard has disconnected.
        Specified by:
        publishDisconnected in interface ShardCoordinator
        Parameters:
        shardInfo - the disconnected shard details
        sessionInfo - the disconnected shard session details to resume, or null if resume is not available
        Returns:
        a Mono indicating when this operation has completed
      • getIdentifyLimiter

        public PayloadTransformer getIdentifyLimiter​(ShardInfo shardInfo,
                                                     int maxConcurrency)
        Description copied from interface: ShardCoordinator
        Returns a transformation function for a sequence of payloads that can be held or delayed in order to successfully identify multiple shards in a coordinated manner.
        Specified by:
        getIdentifyLimiter in interface ShardCoordinator
        Parameters:
        shardInfo - the shard from where to retrieve the limiter
        maxConcurrency - the number of shards that can be concurrently identified
        Returns:
        a PayloadTransformer allowing IDENTIFY payload coordination across shards