abstract class AbstractTimeSnapshot extends java.lang.Object implements UniformTimeSnapshot
UniformTimeSnapshot
.Modifier and Type | Field and Description |
---|---|
private long |
timeInterval |
private java.util.concurrent.TimeUnit |
timeIntervalUnit |
Modifier | Constructor and Description |
---|---|
protected |
AbstractTimeSnapshot(long timeInterval,
java.util.concurrent.TimeUnit timeIntervalUnit)
Constructor to be used by subclasses overriding the base abstract uniform time snapshot class.
|
Modifier and Type | Method and Description |
---|---|
double |
getRate(java.util.concurrent.TimeUnit timeUnit)
The rate of values in this snapshot for one given time unit.
|
long |
getTimeInterval(java.util.concurrent.TimeUnit timeUnit)
The time interval for which this snapshot was created.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getMax, getMean, getMin, size
private final long timeInterval
private final java.util.concurrent.TimeUnit timeIntervalUnit
protected AbstractTimeSnapshot(long timeInterval, java.util.concurrent.TimeUnit timeIntervalUnit)
timeInterval
- The time interval of this snapshot.timeIntervalUnit
- The time interval unit.public long getTimeInterval(java.util.concurrent.TimeUnit timeUnit)
UniformTimeSnapshot
getTimeInterval
in interface UniformTimeSnapshot
timeUnit
- The time unit in which to return the time interval.public double getRate(java.util.concurrent.TimeUnit timeUnit)
UniformTimeSnapshot
getRate
in interface UniformTimeSnapshot
timeUnit
- The time unit at which to get the rate