@Internal public class CachedBufferBlocker extends Object implements BufferBlocker
This buffer blocked can be used in credit-based flow control for better barrier alignment in exactly-once mode.
限定符和类型 | 类和说明 |
---|---|
static class |
CachedBufferBlocker.CachedBufferOrEventSequence
This class represents a sequence of cached buffers and events, created by the
CachedBufferBlocker . |
构造器和说明 |
---|
CachedBufferBlocker(int pageSize)
Creates a new buffer blocker, caching the buffers or events in memory queue.
|
限定符和类型 | 方法和说明 |
---|---|
void |
add(org.apache.flink.runtime.io.network.partition.consumer.BufferOrEvent boe)
Adds a buffer or event to the blocker.
|
void |
close()
Cleans up all the resources in the current sequence.
|
long |
getBytesBlocked()
Gets the number of bytes blocked in the current sequence.
|
BufferOrEventSequence |
rollOverReusingResources()
It is never reusing resources and is defaulting to
rollOverWithoutReusingResources() . |
BufferOrEventSequence |
rollOverWithoutReusingResources()
Starts a new sequence of buffers and event without reusing the same resources and
returns the current sequence of buffers for reading.
|
public CachedBufferBlocker(int pageSize)
pageSize
- The page size used to estimate the cached size.public void add(org.apache.flink.runtime.io.network.partition.consumer.BufferOrEvent boe)
BufferBlocker
add
在接口中 BufferBlocker
boe
- The buffer or event to be added into the blocker.public BufferOrEventSequence rollOverReusingResources()
rollOverWithoutReusingResources()
.rollOverReusingResources
在接口中 BufferBlocker
public BufferOrEventSequence rollOverWithoutReusingResources()
BufferBlocker
rollOverWithoutReusingResources
在接口中 BufferBlocker
public void close()
BufferBlocker
close
在接口中 BufferBlocker
public long getBytesBlocked()
BufferBlocker
getBytesBlocked
在接口中 BufferBlocker
Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.