Package org.elasticsearch.cluster.block
Class ClusterBlocks
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.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
index, ClusterBlock block)
boolean
index, int blockId)
boolean
indexBlocked(ClusterBlockLevel level, index)
indexBlockedException(ClusterBlockLevel level, index)
void
indexBlockedRaiseException(ClusterBlockLevel level, index)
,<ClusterBlock>>
indices()
,<ClusterBlock>>
indices(ClusterBlockLevel level)
[] indices)
Returnstrue
iff non of the given have aClusterBlockLevel.METADATA_WRITE
in place where theClusterBlock.isAllowReleaseResources()
returnsfalse
.indicesBlockedException(ClusterBlockLevel level, [] indices)
static Diff<ClusterBlocks>
readDiffFrom(StreamInput in)
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
Methods inherited from class java.lang.
, , , , , , , , ,
-
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
public boolean hasIndexBlockWithId( index, int blockId) -
getIndexBlockWithId
@Nullable public index, int blockId) -
globalBlockedRaiseException
- Throws:
ClusterBlockException
-
globalBlockedException
-
indexBlockedRaiseException
public void indexBlockedRaiseException(ClusterBlockLevel level, index) throws ClusterBlockException- Throws:
ClusterBlockException
-
indexBlockedException
-
indexBlocked
-
indicesBlockedException
-
indicesAllowReleaseResources
public [] indices)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
public toString()- Overrides:
in class
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Throws:
-
readFrom
- Throws:
-
readDiffFrom
- Throws:
-
builder
-