Acquire a permit for a shard (ShardPermit) asynchronously.
Acquire a permit for a shard (ShardPermit) asynchronously. A ShardPermit contains a zero-indexed shard ID. Be sure to call release() on the ShardPermit when your client is finished performing work for the shard.
A Future of ShardPermit that is satisfied when a shard slot becomes available.
when a shard cannot be acquired due to an unexpected state in the zookeeper tree. Assumed to only happen if some zookeeper client clobbers the tree location for this ShardCoordinator.
SemaphoreErrorwhen the underlying semaphore throws an exception.
A rudimentary shard/partition coordinator. Provides ShardPermits by lowest available ID first (linear scan).