java.lang.Object
org.elasticsearch.cluster.block.ClusterBlocks
- All Implemented Interfaces:
Diffable<ClusterBlocks>,SimpleDiffable<ClusterBlocks>,Writeable
Represents current cluster level blocks to block dirty operations done against the cluster.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.elasticsearch.cluster.SimpleDiffable
SimpleDiffable.CompleteDiff<T extends Diffable<T>>Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsFields inherited from interface org.elasticsearch.cluster.SimpleDiffable
EMPTY -
Method Summary
Modifier and TypeMethodDescriptionstatic ClusterBlocks.Builderbuilder()static ClusterBlocks.Builderbuilder(ClusterBlocks blocks) Convenience method, equivalent to:builder().blocks(blocks)booleanReturnstrueif one of the global blocks as its disable state persistence flag set.getIndexBlockWithId(String index, int blockId) global()global(ClusterBlockLevel level) voidbooleanhasGlobalBlock(ClusterBlock block) booleanhasGlobalBlockWithId(int blockId) booleanbooleanhasGlobalBlockWithStatus(RestStatus status) Is there a global block with the provided status?booleanhasIndexBlock(String index, ClusterBlock block) booleanhasIndexBlockLevel(String index, ClusterBlockLevel level) booleanhasIndexBlockWithId(String index, int blockId) booleanindexBlocked(ClusterBlockLevel level, String index) indexBlockedException(ClusterBlockLevel level, String index) voidindexBlockedRaiseException(ClusterBlockLevel level, String index) indices()indices(ClusterBlockLevel level) indicesAllowReleaseResources(String[] indices) Returnstrueiff non of the given have aClusterBlockLevel.METADATA_WRITEin place where theClusterBlock.isAllowReleaseResources()returnsfalse.indicesBlockedException(ClusterBlockLevel level, String[] indices) static Diff<ClusterBlocks> static ClusterBlocksreadFrom(StreamInput in) toString()voidwriteTo(StreamOutput out) Write this into the StreamOutput.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.cluster.SimpleDiffable
diff
-
Field Details
-
EMPTY_CLUSTER_BLOCK
-
-
Method Details
-
global
-
indices
-
global
-
indices
-
disableStatePersistence
public boolean disableStatePersistence()Returnstrueif one of the global blocks as its disable state persistence flag set. -
hasGlobalBlock
-
hasGlobalBlockWithId
public boolean hasGlobalBlockWithId(int blockId) -
hasGlobalBlockWithLevel
-
hasGlobalBlockWithStatus
Is there a global block with the provided status? -
hasIndexBlock
-
hasIndexBlockLevel
-
hasIndexBlockWithId
-
getIndexBlockWithId
-
globalBlockedRaiseException
- Throws:
ClusterBlockException
-
globalBlockedException
-
indexBlockedRaiseException
public void indexBlockedRaiseException(ClusterBlockLevel level, String index) throws ClusterBlockException - Throws:
ClusterBlockException
-
indexBlockedException
-
indexBlocked
-
indicesBlockedException
-
indicesAllowReleaseResources
Returnstrueiff non of the given have aClusterBlockLevel.METADATA_WRITEin place where theClusterBlock.isAllowReleaseResources()returnsfalse. This is used in places where resources will be released like the deletion of an index to free up resources on nodes.- Parameters:
indices- the indices to check
-
toString
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
readFrom
- Throws:
IOException
-
readDiffFrom
- Throws:
IOException
-
builder
-
builder
Convenience method, equivalent to:builder().blocks(blocks)
-