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 classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ClusterBlocks.Builder
builder()
boolean
Returnstrue
if one of the global blocks as its disable state persistence flag set.getIndexBlockWithId(String index, int blockId)
global()
global(ClusterBlockLevel level)
void
boolean
hasGlobalBlock(ClusterBlock block)
boolean
hasGlobalBlockWithId(int blockId)
boolean
boolean
hasGlobalBlockWithStatus(RestStatus status)
Is there a global block with the provided status?boolean
hasIndexBlock(String index, ClusterBlock block)
boolean
hasIndexBlockWithId(String index, int blockId)
boolean
indexBlocked(ClusterBlockLevel level, String index)
indexBlockedException(ClusterBlockLevel level, String index)
void
indexBlockedRaiseException(ClusterBlockLevel level, String index)
indices()
indices(ClusterBlockLevel level)
indicesAllowReleaseResources(String[] indices)
Returnstrue
iff non of the given have aClusterBlockLevel.METADATA_WRITE
in place where theClusterBlock.isAllowReleaseResources()
returnsfalse
.indicesBlockedException(ClusterBlockLevel level, String[] indices)
static Diff<ClusterBlocks>
static ClusterBlocks
readFrom(StreamInput in)
toString()
void
writeTo(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()Returnstrue
if 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
Returnstrue
iff non of the given have aClusterBlockLevel.METADATA_WRITE
in 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:Writeable
Write this into the StreamOutput.- Throws:
IOException
-
readFrom
- Throws:
IOException
-
readDiffFrom
- Throws:
IOException
-
builder
-