Interface ShardAllocatorManager

  • All Known Implementing Classes:
    ShardAllocationManagerImpl

    public interface ShardAllocatorManager
    ShardAllocatorManager is responsible for the mapping between index shards and Infinispan segments for all indexes in a cache.
    Since:
    9.0
    • Method Detail

      • getShardFromSegment

        java.lang.String getShardFromSegment​(int segment)
        Returns:
        the shard name for a certain segment.
      • getShards

        java.util.Set<java.lang.String> getShards()
        Returns:
        the list of all shards available.
      • getShardsForModification

        java.util.Set<java.lang.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,
                                   java.lang.String shardId)
        Returns:
        Owner of an index shard given a certain ConsistentHash.
      • getOwner

        Address getOwner​(java.lang.String shardId)
        Returns:
        Owner of an index shard.
      • getShardFromKey

        java.lang.String getShardFromKey​(java.lang.Object key)
      • initialize

        void initialize​(int numberOfShards,
                        int numSegments)
        Initializes the ShardAllocatorManager with the configured number of segments and shards.