Package org.elasticsearch.cluster.block
Class ClusterBlocks
java.lang.Object
org.elasticsearch.cluster.AbstractDiffable<ClusterBlocks>
org.elasticsearch.cluster.block.ClusterBlocks
- All Implemented Interfaces:
Diffable<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.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic ClusterBlocks.Builderbuilder()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)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 org.elasticsearch.cluster.AbstractDiffable
diff, readDiffFrom
-
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
-
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.- Throws:
IOException
-
readFrom
- Throws:
IOException
-
readDiffFrom
- Throws:
IOException
-
builder
-