Streamable
, Writeable
, ToXContent
, ToXContentFragment
public class NodeUsage extends BaseNodeResponse implements ToXContentFragment
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
TransportResponse.Empty
Writeable.Reader<V>, Writeable.Writer<V>
EMPTY_PARAMS
Constructor | Description |
---|---|
NodeUsage(DiscoveryNode node,
long timestamp,
long sinceTime,
java.util.Map<java.lang.String,java.lang.Long> restUsage) |
Modifier and Type | Method | Description |
---|---|---|
java.util.Map<java.lang.String,java.lang.Long> |
getRestUsage() |
|
long |
getSinceTime() |
|
long |
getTimestamp() |
|
void |
readFrom(StreamInput in) |
Set this object's fields from a StreamInput.
|
static NodeUsage |
readNodeStats(StreamInput in) |
|
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
|
void |
writeTo(StreamOutput out) |
Write this object's fields to a StreamOutput.
|
getNode
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isFragment
remoteAddress, remoteAddress
public NodeUsage(DiscoveryNode node, long timestamp, long sinceTime, java.util.Map<java.lang.String,java.lang.Long> restUsage)
node
- the node these statistics were collected fromtimestamp
- the timestamp for when these statistics were collectedsinceTime
- the timestamp for when the collection of these statistics
startedrestUsage
- a map containing the counts of the number of times each REST
endpoint has been calledpublic static NodeUsage readNodeStats(StreamInput in) throws java.io.IOException
java.io.IOException
public long getTimestamp()
public long getSinceTime()
public java.util.Map<java.lang.String,java.lang.Long> getRestUsage()
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
toXContent
in interface ToXContent
java.io.IOException
public void readFrom(StreamInput in) throws java.io.IOException
Streamable
readFrom
in interface Streamable
readFrom
in class BaseNodeResponse
java.io.IOException
public void writeTo(StreamOutput out) throws java.io.IOException
Streamable
writeTo
in interface Streamable
writeTo
in interface Writeable
writeTo
in class BaseNodeResponse
java.io.IOException