@Internal public interface BufferStorage extends AutoCloseable
BufferStorage takes the buffers and events from a data stream and adds them in a sequence.
After a number of elements have been added, the BufferStorage can "roll over".
After rolling over, previously stored buffers are available for reading via pollNext().| Modifier and Type | Method and Description |
|---|---|
void |
add(org.apache.flink.runtime.io.network.partition.consumer.BufferOrEvent boe)
Adds a buffer or event to the
BufferStorage. |
void |
close()
Cleans up all the resources in the current sequence.
|
long |
getMaxBufferedBytes() |
long |
getPendingBytes() |
long |
getRolledBytes() |
boolean |
isEmpty() |
boolean |
isFull() |
Optional<org.apache.flink.runtime.io.network.partition.consumer.BufferOrEvent> |
pollNext() |
void |
rollOver()
Start returning next sequence of stored
BufferOrEvents. |
void add(org.apache.flink.runtime.io.network.partition.consumer.BufferOrEvent boe)
BufferStorage.boe - The buffer or event to be added into the blocker.boolean isFull()
void rollOver()
BufferOrEvents.long getPendingBytes()
long getRolledBytes()
boolean isEmpty()
BufferStorage doesn't store and data.Optional<org.apache.flink.runtime.io.network.partition.consumer.BufferOrEvent> pollNext()
long getMaxBufferedBytes()
void close()
close in interface AutoCloseableCopyright © 2014–2020 The Apache Software Foundation. All rights reserved.