public class LinkedBufferStorage extends Object implements BufferStorage
BufferStorage that links two BufferStorage together.
Each of the linked BufferStorage will store buffers independently, but they will be
linked together for rollOver() - if one is rolled over, other will do that as well.
Note that only mainStorage is closed when LinkedBufferStorage instance is closed.
| 构造器和说明 |
|---|
LinkedBufferStorage(BufferStorage mainStorage,
BufferStorage linkedStorage,
long maxBufferedBytes) |
| 限定符和类型 | 方法和说明 |
|---|---|
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. |
public LinkedBufferStorage(BufferStorage mainStorage, BufferStorage linkedStorage, long maxBufferedBytes)
public void add(org.apache.flink.runtime.io.network.partition.consumer.BufferOrEvent boe)
BufferStorageBufferStorage.add 在接口中 BufferStorageboe - The buffer or event to be added into the blocker.public boolean isFull()
isFull 在接口中 BufferStoragepublic void rollOver()
BufferStorageBufferOrEvents.rollOver 在接口中 BufferStoragepublic long getPendingBytes()
getPendingBytes 在接口中 BufferStoragepublic long getRolledBytes()
getRolledBytes 在接口中 BufferStoragepublic boolean isEmpty()
isEmpty 在接口中 BufferStorageBufferStorage doesn't store and data.public Optional<org.apache.flink.runtime.io.network.partition.consumer.BufferOrEvent> pollNext()
pollNext 在接口中 BufferStoragepublic long getMaxBufferedBytes()
getMaxBufferedBytes 在接口中 BufferStoragepublic void close()
BufferStorageclose 在接口中 AutoCloseableclose 在接口中 BufferStorageCopyright © 2014–2021 The Apache Software Foundation. All rights reserved.