public static interface IndicesClusterStateService.Shard
Modifier and Type | Method and Description |
---|---|
RecoveryState |
recoveryState()
Returns the recovery state associated with this shard.
|
ShardRouting |
routingEntry()
Returns the latest cluster routing entry received with this shard.
|
ShardId |
shardId()
Returns the shard id of this shard.
|
IndexShardState |
state()
Returns the latest internal shard state.
|
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.
|
ShardId shardId()
ShardRouting routingEntry()
IndexShardState state()
RecoveryState recoveryState()
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) throws java.io.IOException
GlobalCheckpointTracker.updateFromMaster(long, Set, IndexShardRoutingTable, Set)
for details.shardRouting
- the new routing entryprimaryTerm
- the new primary termprimaryReplicaSyncer
- the primary-replica resync action to trigger when a term is increased on a primaryapplyingClusterStateVersion
- the cluster state version being applied when updating the allocation IDs from the masterinSyncAllocationIds
- the allocation ids of the currently in-sync shard copiesroutingTable
- the shard routing tableIndexShardRelocatedException
- if shard is marked as relocated and relocation abortedjava.io.IOException
- if shard state could not be persisted