T - type of data wrapperpublic abstract class LeapArray<T> extends Object
| Modifier and Type | Field and Description |
|---|---|
protected AtomicReferenceArray<WindowWrap<T>> |
array |
protected int |
intervalInMs |
protected int |
sampleCount |
protected int |
windowLength |
| Constructor and Description |
|---|
LeapArray(int windowLength,
int intervalInSec) |
| Modifier and Type | Method and Description |
|---|---|
WindowWrap<T> |
currentWindow() |
abstract WindowWrap<T> |
currentWindow(long time)
Get window at provided timestamp.
|
WindowWrap<T> |
getPreviousWindow() |
WindowWrap<T> |
getPreviousWindow(long time) |
T |
getWindowValue(long time) |
List<WindowWrap<T>> |
list() |
List<T> |
values() |
protected int windowLength
protected int sampleCount
protected int intervalInMs
protected AtomicReferenceArray<WindowWrap<T>> array
public WindowWrap<T> currentWindow()
public abstract WindowWrap<T> currentWindow(long time)
time - a valid timestamppublic WindowWrap<T> getPreviousWindow(long time)
public WindowWrap<T> getPreviousWindow()
public T getWindowValue(long time)
public List<WindowWrap<T>> list()
Copyright © 2018 Alibaba Group. All rights reserved.