public final class CounterSample extends CounterSample
CounterSample
with added JMX capabilities to be return as object via
MXBean method.
Example:
SimonManagerMXBean simon = JMX.newMXBeanProxy(..., new ObjectName("domain:type=Simon"), SimonManagerMXBean.class); CounterSample = simon.getCounterSample("simon.counter");
Constructor and Description |
---|
CounterSample(String name,
String note,
long firstUsage,
long lastUsage,
long counter,
long min,
long max,
long minTimestamp,
long maxTimestamp,
long incSum,
long decSum)
JMX constructor.
|
Modifier and Type | Method and Description |
---|---|
Date |
getFirstUsageAsDate()
Timestamp of the first usage from the sampled Simon as a formatted date.
|
String |
getFirstUsageAsString()
Timestamp of the first usage from the sampled Simon as a formatted string.
|
Date |
getLastUsageAsDate()
Timestamp of the last usage from the sampled Simon as a date.
|
String |
getLastUsageAsString()
Timestamp of the last usage from the sampled Simon as a formatted string.
|
Date |
getMaxTimestampAsDate()
Returns ms timestamp when the max value was measured as a formatted date.
|
String |
getMaxTimestampAsString()
Returns ms timestamp when the max value was measured as a formatted string.
|
Date |
getMinTimestampAsDate()
Returns ms timestamp when the min value was measured as a formatted date.
|
String |
getMinTimestampAsString()
Returns ms timestamp when the min value was measured as a formatted string.
|
getCounter, getDecrementSum, getIncrementSum, getMax, getMaxTimestamp, getMin, getMinTimestamp, getTotalAsString, setCounter, setDecrementSum, setIncrementSum, setMax, setMaxTimestamp, setMin, setMinTimestamp, simonToString, toString
getFirstUsage, getLastUsage, getName, getNote, setFirstUsage, setLastUsage, setName, setNote
@ConstructorProperties(value={"name","note","firstUsage","lastUsage","counter","min","max","minTimestamp","maxTimestamp","incrementSum","decrementSum"}) public CounterSample(String name, String note, long firstUsage, long lastUsage, long counter, long min, long max, long minTimestamp, long maxTimestamp, long incSum, long decSum)
name
- Simon's namenote
- note (provided optionally)firstUsage
- first usage ms timestamplastUsage
- last usage ms timestampcounter
- actual counter valuemin
- minimal counter valuemax
- maximal counter valueminTimestamp
- time when counter reached minimal valuemaxTimestamp
- time when counter reached maximal valueincSum
- sum of all incrementsdecSum
- sum of all decrementspublic String getFirstUsageAsString()
public Date getFirstUsageAsDate()
public String getLastUsageAsString()
public Date getLastUsageAsDate()
public final String getMinTimestampAsString()
public final Date getMinTimestampAsDate()
public final String getMaxTimestampAsString()
public final Date getMaxTimestampAsDate()
Copyright © 2019. All rights reserved.