T - The type of elements that this WindowBuffer can store.public class HeapWindowBuffer<T> extends Object implements EvictingWindowBuffer<T>
EvictingWindowBuffer that stores elements on the Java Heap.| Modifier and Type | Class and Description |
|---|---|
static class |
HeapWindowBuffer.Factory<T> |
| Modifier | Constructor and Description |
|---|---|
protected |
HeapWindowBuffer() |
| Modifier and Type | Method and Description |
|---|---|
Iterable<StreamRecord<T>> |
getElements()
Returns all elements that are currently in the buffer.
|
Iterable<T> |
getUnpackedElements()
Returns all elements that are currently in the buffer.
|
void |
removeElements(int count)
Removes the given number of elements, starting from the beginning.
|
int |
size()
Returns the number of elements that are currently in the buffer.
|
void |
storeElement(StreamRecord<T> element)
Adds the element to the buffer.
|
public void storeElement(StreamRecord<T> element)
WindowBufferstoreElement in interface WindowBuffer<T>element - The element to add.public void removeElements(int count)
EvictingWindowBufferremoveElements in interface EvictingWindowBuffer<T>count - The number of elements to remove.public Iterable<StreamRecord<T>> getElements()
WindowBuffergetElements in interface WindowBuffer<T>public Iterable<T> getUnpackedElements()
WindowBufferStreamRecord.getUnpackedElements in interface WindowBuffer<T>public int size()
WindowBuffersize in interface WindowBuffer<T>Copyright © 2014–2016 The Apache Software Foundation. All rights reserved.