T - The type of elements that this WindowBuffer can store.O - The type of elements that this window buffer will return when asked for its contents.@Internal
public interface WindowBuffer<T,O>
WindowBuffer is used by
WindowOperator to store
the elements of one pane.
A pane is the bucket of elements that have the same key (assigned by the
KeySelector) and same Window. An element can
be in multiple panes of it was assigned to multiple windows by the
WindowAssigner. These panes all
have their own instance of the Evictor.
| Modifier and Type | Method and Description |
|---|---|
Iterable<StreamRecord<O>> |
getElements()
Returns all elements that are currently in the buffer.
|
Iterable<O> |
getUnpackedElements()
Returns all elements that are currently in the buffer.
|
int |
size()
Returns the number of elements that are currently in the buffer.
|
void |
snapshot(org.apache.flink.core.memory.DataOutputView out)
Writes the contents of the window buffer to a
DataOutputView for checkpointing. |
void |
storeElement(StreamRecord<T> element)
Adds the element to the buffer.
|
void storeElement(StreamRecord<T> element) throws Exception
element - The element to add.ExceptionIterable<StreamRecord<O>> getElements()
Iterable<O> getUnpackedElements()
StreamRecord.int size()
void snapshot(org.apache.flink.core.memory.DataOutputView out)
throws IOException
DataOutputView for checkpointing.IOExceptionCopyright © 2014–2016 The Apache Software Foundation. All rights reserved.