org.elasticsearch.cluster.block
Class ClusterBlock

java.lang.Object
  extended by org.elasticsearch.cluster.block.ClusterBlock
All Implemented Interfaces:
Serializable, Streamable, ToXContent

public class ClusterBlock
extends Object
implements Serializable, Streamable, ToXContent

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.MapParams, ToXContent.Params
 
Field Summary
 
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
 
Constructor Summary
ClusterBlock(int id, String description, boolean retryable, boolean disableStatePersistence, RestStatus status, ClusterBlockLevel... levels)
           
 
Method Summary
 boolean contains(ClusterBlockLevel level)
           
 String description()
           
 boolean disableStatePersistence()
          Should global state persistence be disabled when this block is present.
 boolean equals(Object o)
           
 int hashCode()
           
 int id()
           
 ClusterBlockLevel[] levels()
           
static ClusterBlock readClusterBlock(StreamInput in)
           
 void readFrom(StreamInput in)
           
 boolean retryable()
          Should operations get into retry state if this block is present.
 RestStatus status()
           
 String toString()
           
 XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params)
           
 void writeTo(StreamOutput out)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClusterBlock

public ClusterBlock(int id,
                    String description,
                    boolean retryable,
                    boolean disableStatePersistence,
                    RestStatus status,
                    ClusterBlockLevel... levels)
Method Detail

id

public int id()

description

public String description()

status

public RestStatus status()

levels

public ClusterBlockLevel[] levels()

contains

public boolean contains(ClusterBlockLevel level)

retryable

public boolean retryable()
Should operations get into retry state if this block is present.


disableStatePersistence

public boolean disableStatePersistence()
Should global state persistence be disabled when this block is present. Note, only relevant for global blocks.


toXContent

public XContentBuilder toXContent(XContentBuilder builder,
                                  ToXContent.Params params)
                           throws IOException
Specified by:
toXContent in interface ToXContent
Throws:
IOException

readClusterBlock

public static ClusterBlock readClusterBlock(StreamInput in)
                                     throws IOException
Throws:
IOException

readFrom

public void readFrom(StreamInput in)
              throws IOException
Specified by:
readFrom in interface Streamable
Throws:
IOException

writeTo

public void writeTo(StreamOutput out)
             throws IOException
Specified by:
writeTo in interface Streamable
Throws:
IOException

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2009-2012. All Rights Reserved.