Package org.infinispan.query.affinity
Interface ShardAllocatorManager
-
- All Known Implementing Classes:
ShardAllocationManagerImpl
public interface ShardAllocatorManagerShardAllocatorManager is responsible for the mapping between index shards and Infinispan segments for all indexes in a cache.- Since:
- 9.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AddressgetOwner(String shardId)StringgetShardFromKey(Object key)StringgetShardFromSegment(int segment)Set<String>getShards()Set<String>getShardsForModification(Address address)voidinitialize(int numberOfShards, int numSegments)Initializes theShardAllocatorManagerwith the configured number of segments and shards.booleanisOwnershipChanged(TopologyChangedEvent<?,?> tce, String shardId)
-
-
-
Method Detail
-
getShardFromSegment
String getShardFromSegment(int segment)
- Returns:
- the shard name for a certain segment.
-
getShardsForModification
Set<String> getShardsForModification(Address address)
- Returns:
- the list of shards used to do modifications to the index for a given address.
-
isOwnershipChanged
boolean isOwnershipChanged(TopologyChangedEvent<?,?> tce, String shardId)
- Returns:
- Owner of an index shard given a certain
ConsistentHash.
-
initialize
void initialize(int numberOfShards, int numSegments)Initializes theShardAllocatorManagerwith the configured number of segments and shards.
-
-