public class OsStats extends java.lang.Object implements Writeable, ToXContent
Modifier and Type | Class and Description |
---|---|
static class |
OsStats.Cpu |
static class |
OsStats.Mem |
static class |
OsStats.Swap |
Writeable.Reader<V>, Writeable.Writer<V>
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
EMPTY_PARAMS
Constructor and Description |
---|
OsStats(long timestamp,
OsStats.Cpu cpu,
OsStats.Mem mem,
OsStats.Swap swap) |
OsStats(StreamInput in) |
Modifier and Type | Method and Description |
---|---|
static short |
calculatePercentage(long used,
long max) |
OsStats.Cpu |
getCpu() |
OsStats.Mem |
getMem() |
OsStats.Swap |
getSwap() |
long |
getTimestamp() |
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
void |
writeTo(StreamOutput out)
Write this into the StreamOutput.
|
public OsStats(long timestamp, OsStats.Cpu cpu, OsStats.Mem mem, OsStats.Swap swap)
public OsStats(StreamInput in) throws java.io.IOException
java.io.IOException
public void writeTo(StreamOutput out) throws java.io.IOException
Writeable
public long getTimestamp()
public OsStats.Cpu getCpu()
public OsStats.Mem getMem()
public OsStats.Swap getSwap()
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
toXContent
in interface ToXContent
java.io.IOException
public static short calculatePercentage(long used, long max)