public interface AggregationStore<InputType>
| Modifier and Type | Method and Description |
|---|---|
void |
addSlice(int index,
Slice newSlice)
Add a new Slice at a specific index
|
void |
aggregate(WindowManager.AggregationWindowCollector aggregateWindows,
long minTs,
long maxTs)
Generates the window aggregates.
|
void |
appendSlice(Slice<InputType,?> newSlice)
Appends a new slice as new current slice
|
int |
findSliceByEnd(long pre) |
int |
findSliceIndexByTimestamp(long ts)
Lookup for a slice which contains this timestamp.
|
Slice<InputType,?> |
getCurrentSlice() |
Slice<InputType,?> |
getSlice(int index)
Returns slice for a given index or @
IndexOutOfBoundsException |
void |
insertValueToCurrentSlice(InputType element,
long ts)
Insert the element to the current slice.
|
void |
insertValueToSlice(int index,
InputType element,
long ts) |
boolean |
isEmpty() |
void |
mergeSlice(int sliceIndex)
Merging two slices A and B happens in three steps:
1.
|
int |
size() |
int findSliceIndexByTimestamp(long ts)
ts - element timestampSlice<InputType,?> getSlice(int index)
IndexOutOfBoundsExceptionindex - >= 0 < sizevoid insertValueToCurrentSlice(InputType element, long ts)
element - the elementts - timestamp of recordvoid insertValueToSlice(int index,
InputType element,
long ts)
void appendSlice(Slice<InputType,?> newSlice)
newSlice - int size()
boolean isEmpty()
void aggregate(WindowManager.AggregationWindowCollector aggregateWindows, long minTs, long maxTs)
AggregateWindowState the aggregated value is set.aggregateWindows - definition of the requested windowminTs - startTimestamp of the earliest window.maxTs - endTimestamp of the latest windowvoid addSlice(int index,
Slice newSlice)
index - newSlice - void mergeSlice(int sliceIndex)
sliceIndex - index of slice Aint findSliceByEnd(long pre)