Interface IndicesClusterStateService.Shard

    • Method Detail

      • shardId

        ShardId shardId()
        Returns the shard id of this shard.
      • routingEntry

        ShardRouting routingEntry()
        Returns the latest cluster routing entry received with this shard.
      • recoveryState

        RecoveryState recoveryState()
        Returns the recovery state associated with this shard.
      • updateShardState

        void updateShardState​(ShardRouting shardRouting,
                              long primaryTerm,
                              java.util.function.BiConsumer<IndexShard,​ActionListener<PrimaryReplicaSyncer.ResyncTask>> primaryReplicaSyncer,
                              long applyingClusterStateVersion,
                              java.util.Set<java.lang.String> inSyncAllocationIds,
                              IndexShardRoutingTable routingTable,
                              java.util.Set<java.lang.String> pre60AllocationIds)
        Updates the shard state based on an incoming cluster state: - Updates and persists the new routing value. - Updates the primary term if this shard is a primary. - Updates the allocation ids that are tracked by the shard if it is a primary. See ReplicationTracker.updateFromMaster(long, Set, IndexShardRoutingTable, Set) for details.
        shardRouting - the new routing entry
        primaryTerm - the new primary term
        primaryReplicaSyncer - the primary-replica resync action to trigger when a term is increased on a primary
        applyingClusterStateVersion - the cluster state version being applied when updating the allocation IDs from the master
        inSyncAllocationIds - the allocation ids of the currently in-sync shard copies
        routingTable - the shard routing table
        IndexShardRelocatedException - if shard is marked as relocated and relocation aborted - if shard state could not be persisted