Class ClusterStateResponse
- java.lang.Object
-
- org.elasticsearch.transport.TransportMessage
-
- org.elasticsearch.transport.TransportResponse
-
- org.elasticsearch.action.ActionResponse
-
- org.elasticsearch.action.admin.cluster.state.ClusterStateResponse
-
- All Implemented Interfaces:
Streamable,Writeable
public class ClusterStateResponse extends ActionResponse
The response for getting the cluster state.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.elasticsearch.transport.TransportResponse
TransportResponse.Empty
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
-
Constructor Summary
Constructors Constructor Description ClusterStateResponse()ClusterStateResponse(ClusterName clusterName, ClusterState clusterState, long sizeInBytes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClusterNamegetClusterName()The name of the cluster.ClusterStategetState()The requested cluster state.ByteSizeValuegetTotalCompressedSize()The total compressed size of the full cluster state, not just the parts returned bygetState().voidreadFrom(StreamInput in)Set this object's fields from a StreamInput.voidwriteTo(StreamOutput out)Write this object's fields to a StreamOutput.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.common.io.stream.Streamable
-
Methods inherited from class org.elasticsearch.transport.TransportMessage
remoteAddress, remoteAddress
-
-
-
-
Constructor Detail
-
ClusterStateResponse
public ClusterStateResponse()
-
ClusterStateResponse
public ClusterStateResponse(ClusterName clusterName, ClusterState clusterState, long sizeInBytes)
-
-
Method Detail
-
getState
public ClusterState getState()
The requested cluster state. Only the parts of the cluster state that were requested are included in the returnedClusterStateinstance.
-
getClusterName
public ClusterName getClusterName()
The name of the cluster.
-
getTotalCompressedSize
public ByteSizeValue getTotalCompressedSize()
The total compressed size of the full cluster state, not just the parts returned bygetState(). The total compressed size is the size of the cluster state as it would be transmitted over the network during intra-node communication.
-
readFrom
public void readFrom(StreamInput in) throws java.io.IOException
Description copied from interface:StreamableSet this object's fields from a StreamInput.- Specified by:
readFromin interfaceStreamable- Overrides:
readFromin classActionResponse- Throws:
java.io.IOException
-
writeTo
public void writeTo(StreamOutput out) throws java.io.IOException
Description copied from interface:StreamableWrite this object's fields to a StreamOutput.- Specified by:
writeToin interfaceStreamable- Specified by:
writeToin interfaceWriteable- Overrides:
writeToin classActionResponse- Throws:
java.io.IOException
-
-