public class StepCounter extends AbstractMonitor<java.lang.Number> implements Counter
config
Constructor and Description |
---|
StepCounter(MonitorConfig config)
Creates a new instance of the counter.
|
StepCounter(MonitorConfig config,
Clock clock)
Creates a new instance of the counter.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
long |
getCount(int pollerIndex)
Get the count for the last completed polling interval for the given poller index.
|
long |
getCurrentCount(int pollerIndex)
Get the current count for the given poller index.
|
java.lang.Number |
getValue(int pollerIndex)
Returns the current value for the monitor for the nth poller.
|
int |
hashCode() |
void |
increment()
Update the count by one.
|
void |
increment(long amount)
Update the count by the specified amount.
|
java.lang.String |
toString() |
getConfig, getValue
public StepCounter(MonitorConfig config)
public StepCounter(MonitorConfig config, Clock clock)
public void increment()
public void increment(long amount)
public java.lang.Number getValue(int pollerIndex)
public long getCount(int pollerIndex)
public long getCurrentCount(int pollerIndex)
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object