public static interface IndicesClusterStateService.AllocatedIndices<T extends IndicesClusterStateService.Shard,U extends IndicesClusterStateService.AllocatedIndex<T>>
extends java.lang.Iterable<U>
Modifier and Type | Method and Description |
---|---|
U |
createIndex(NodeServicesProvider nodeServicesProvider,
IndexMetaData indexMetaData,
java.util.List<IndexEventListener> builtInIndexListener)
Creates a new
IndexService for the given metadata. |
T |
createShard(ShardRouting shardRouting,
RecoveryState recoveryState,
PeerRecoveryTargetService recoveryTargetService,
PeerRecoveryTargetService.RecoveryListener recoveryListener,
RepositoriesService repositoriesService,
NodeServicesProvider nodeServicesProvider,
Callback<IndexShard.ShardFailure> onShardFailure)
Creates shard for the specified shard routing and starts recovery,
|
void |
deleteIndex(Index index,
java.lang.String reason)
Deletes the given index.
|
void |
deleteUnassignedIndex(java.lang.String reason,
IndexMetaData metaData,
ClusterState clusterState)
Deletes an index that is not assigned to this node.
|
default T |
getShardOrNull(ShardId shardId)
Returns shard for the specified id if it exists otherwise returns
null . |
U |
indexService(Index index)
Returns an IndexService for the specified index if exists otherwise returns
null . |
void |
processPendingDeletes(Index index,
IndexSettings indexSettings,
TimeValue timeValue) |
void |
removeIndex(Index index,
java.lang.String reason)
Removes the given index from this service and releases all associated resources.
|
IndexMetaData |
verifyIndexIsDeleted(Index index,
ClusterState clusterState)
Verify that the contents on disk for the given index is deleted; if not, delete the contents.
|
U createIndex(NodeServicesProvider nodeServicesProvider, IndexMetaData indexMetaData, java.util.List<IndexEventListener> builtInIndexListener) throws java.io.IOException
IndexService
for the given metadata.indexMetaData
- the index metadata to create the index forbuiltInIndexListener
- a list of built-in lifecycle IndexEventListener
that should should be used along side with
the per-index listenersIndexAlreadyExistsException
- if the index already exists.java.io.IOException
IndexMetaData verifyIndexIsDeleted(Index index, ClusterState clusterState)
index
- Index
to make sure its deleted from diskclusterState
- ClusterState
to ensure the index is not part of itvoid deleteIndex(Index index, java.lang.String reason)
removeIndex(Index, String)
but fires
different lifecycle events to ensure pending resources of this index are immediately removed.index
- the index to deletereason
- the high level reason causing this deletevoid deleteUnassignedIndex(java.lang.String reason, IndexMetaData metaData, ClusterState clusterState)
deleteIndex(Index, String)
void removeIndex(Index index, java.lang.String reason)
index
- the index to removereason
- the high level reason causing this removal@Nullable U indexService(Index index)
null
.T createShard(ShardRouting shardRouting, RecoveryState recoveryState, PeerRecoveryTargetService recoveryTargetService, PeerRecoveryTargetService.RecoveryListener recoveryListener, RepositoriesService repositoriesService, NodeServicesProvider nodeServicesProvider, Callback<IndexShard.ShardFailure> onShardFailure) throws java.io.IOException
java.io.IOException
default T getShardOrNull(ShardId shardId)
null
.void processPendingDeletes(Index index, IndexSettings indexSettings, TimeValue timeValue) throws java.io.IOException, java.lang.InterruptedException, ShardLockObtainFailedException
java.io.IOException
java.lang.InterruptedException
ShardLockObtainFailedException