T - data typepublic class WindowWrap<T> extends Object
| Constructor and Description |
|---|
WindowWrap(long windowLengthInMs,
long windowStart,
T value) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isTimeInWindow(long timeMillis)
Check whether given timestamp is in current bucket.
|
WindowWrap<T> |
resetTo(long startTime)
Reset start timestamp of current bucket to provided time.
|
void |
setValue(T value) |
String |
toString() |
T |
value() |
long |
windowLength() |
long |
windowStart() |
public WindowWrap(long windowLengthInMs,
long windowStart,
T value)
windowLengthInMs - a single window bucket's time length in milliseconds.windowStart - the start timestamp of the windowvalue - statistic datapublic long windowLength()
public long windowStart()
public T value()
public void setValue(T value)
public WindowWrap<T> resetTo(long startTime)
startTime - valid start timestamppublic boolean isTimeInWindow(long timeMillis)
timeMillis - valid timestamp in msCopyright © 2019 Alibaba Group. All rights reserved.