java.lang.Iterable<U>IndicesServicepublic static interface IndicesClusterStateService.AllocatedIndices<T extends IndicesClusterStateService.Shard,U extends IndicesClusterStateService.AllocatedIndex<T>>
extends java.lang.Iterable<U>
| Modifier and Type | Interface | Description |
|---|---|---|
static class |
IndicesClusterStateService.AllocatedIndices.IndexRemovalReason |
| Modifier and Type | Method | Description |
|---|---|---|
U |
createIndex(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,
java.util.function.Consumer<IndexShard.ShardFailure> onShardFailure,
java.util.function.Consumer<ShardId> globalCheckpointSyncer) |
Creates shard for the specified shard routing and starts recovery,
|
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,
IndicesClusterStateService.AllocatedIndices.IndexRemovalReason reason,
java.lang.String extraInfo) |
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(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 listenersResourceAlreadyExistsException - if the index already exists.java.io.IOExceptionIndexMetaData verifyIndexIsDeleted(Index index, ClusterState clusterState)
index - Index to make sure its deleted from diskclusterState - ClusterState to ensure the index is not part of itvoid deleteUnassignedIndex(java.lang.String reason,
IndexMetaData metaData,
ClusterState clusterState)
removeIndex(Index, IndexRemovalReason, String)void removeIndex(Index index, IndicesClusterStateService.AllocatedIndices.IndexRemovalReason reason, java.lang.String extraInfo)
index - the index to removereason - the reason to remove the indexextraInfo - extra information that will be used for logging and reporting@Nullable U indexService(Index index)
null.T createShard(ShardRouting shardRouting, RecoveryState recoveryState, PeerRecoveryTargetService recoveryTargetService, PeerRecoveryTargetService.RecoveryListener recoveryListener, RepositoriesService repositoriesService, java.util.function.Consumer<IndexShard.ShardFailure> onShardFailure, java.util.function.Consumer<ShardId> globalCheckpointSyncer) throws java.io.IOException
java.io.IOExceptiondefault T getShardOrNull(ShardId shardId)
null.void processPendingDeletes(Index index, IndexSettings indexSettings, TimeValue timeValue) throws java.io.IOException, java.lang.InterruptedException, ShardLockObtainFailedException
java.io.IOExceptionjava.lang.InterruptedExceptionShardLockObtainFailedException