public class OsStats extends java.lang.Object implements Writeable, ToXContent
Modifier and Type | Class and Description |
---|---|
static class |
OsStats.Cgroup
Encapsulates basic cgroup statistics.
|
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.Cgroup cgroup) |
OsStats(StreamInput in) |
Modifier and Type | Method and Description |
---|---|
static short |
calculatePercentage(long used,
long max) |
OsStats.Cgroup |
getCgroup() |
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isFragment
public OsStats(long timestamp, OsStats.Cpu cpu, OsStats.Mem mem, OsStats.Swap swap, OsStats.Cgroup cgroup)
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 OsStats.Cgroup getCgroup()
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)