public class StepLong extends Object implements StepValue
This class is an internal implementation detail only intended for use within spectator. It is subject to change without notice.
Constructor and Description |
---|
StepLong(long init,
Clock clock,
long step)
Create a new instance.
|
Modifier and Type | Method and Description |
---|---|
AtomicLong |
getCurrent()
Get the AtomicLong for the current bucket.
|
AtomicLong |
getCurrent(long now)
Get the AtomicLong for the current bucket.
|
long |
poll()
Get the value for the last completed interval.
|
long |
poll(long now)
Get the value for the last completed interval.
|
double |
pollAsRate()
Get the value for the last completed interval as a rate per second.
|
double |
pollAsRate(long now)
Get the value for the last completed interval as a rate per second.
|
long |
timestamp()
Get the timestamp for the end of the last completed interval.
|
String |
toString() |
public StepLong(long init, Clock clock, long step)
public AtomicLong getCurrent()
public AtomicLong getCurrent(long now)
public long poll()
public long poll(long now)
public double pollAsRate()
pollAsRate
in interface StepValue
public double pollAsRate(long now)
pollAsRate
in interface StepValue
public long timestamp()