public class TimeWindowedList<T>
extends java.lang.Object
Constructor and Description |
---|
TimeWindowedList(Duration timePeriod) |
TimeWindowedList(java.util.Map<java.lang.String,?> flags) |
Modifier and Type | Method and Description |
---|---|
void |
add(T val) |
void |
add(T val,
long timestamp) |
T |
getLatestValue() |
java.util.List<TimestampedValue<T>> |
getValues() |
java.util.List<TimestampedValue<T>> |
getValues(long now) |
java.util.List<TimestampedValue<T>> |
getValuesInWindow(long now,
Duration subTimePeriod) |
void |
pruneValues(long now) |
void |
setTimePeriod(Duration newTimePeriod) |
java.lang.String |
toString() |
public TimeWindowedList(Duration timePeriod)
public TimeWindowedList(java.util.Map<java.lang.String,?> flags)
public void setTimePeriod(Duration newTimePeriod)
public T getLatestValue()
public java.util.List<TimestampedValue<T>> getValues()
public java.util.List<TimestampedValue<T>> getValues(long now)
public java.util.List<TimestampedValue<T>> getValuesInWindow(long now, Duration subTimePeriod)
public void add(T val)
public void add(T val, long timestamp)
public void pruneValues(long now)
public java.lang.String toString()
toString
in class java.lang.Object