public interface BufferPool extends BufferProvider, BufferRecycler
AvailabilityProvider.AvailabilityHelper
BufferRecycler.DummyBufferRecycler
AVAILABLE
Modifier and Type | Method and Description |
---|---|
int |
bestEffortGetNumOfUsedBuffers()
Returns the number of used buffers of this buffer pool.
|
int |
getMaxNumberOfMemorySegments()
Returns the maximum number of memory segments this buffer pool should use.
|
int |
getMaxOverdraftBuffersPerGate()
Returns the max overdraft buffer size of per gate.
|
int |
getNumberOfAvailableMemorySegments()
Returns the number memory segments, which are currently held by this buffer pool.
|
int |
getNumberOfRequiredMemorySegments()
Returns the number of guaranteed (minimum number of) memory segments of this buffer pool.
|
int |
getNumBuffers()
Returns the current size of this buffer pool.
|
boolean |
isDestroyed()
Checks whether this buffer pool has been destroyed.
|
void |
lazyDestroy()
Destroys this buffer pool.
|
void |
reserveSegments(int numberOfSegmentsToReserve)
Reserves the target number of segments to this pool.
|
void |
setMaxOverdraftBuffersPerGate(int maxOverdraftBuffersPerGate)
Sets the max overdraft buffer size of per gate.
|
void |
setNumBuffers(int numBuffers)
Sets the current size of this buffer pool.
|
addBufferListener, requestBuffer, requestBufferBuilder, requestBufferBuilder, requestBufferBuilderBlocking, requestBufferBuilderBlocking, requestMemorySegment, requestMemorySegmentBlocking
and, getAvailableFuture, isApproximatelyAvailable, isAvailable, or
recycle
void reserveSegments(int numberOfSegmentsToReserve) throws IOException
IOException
void lazyDestroy()
If not all buffers are available, they are recycled lazily as soon as they are recycled.
boolean isDestroyed()
isDestroyed
in interface BufferProvider
int getNumberOfRequiredMemorySegments()
int getMaxNumberOfMemorySegments()
int getNumBuffers()
The size of the buffer pool can change dynamically at runtime.
void setNumBuffers(int numBuffers)
The size needs to be greater or equal to the guaranteed number of memory segments.
void setMaxOverdraftBuffersPerGate(int maxOverdraftBuffersPerGate)
int getMaxOverdraftBuffersPerGate()
int getNumberOfAvailableMemorySegments()
int bestEffortGetNumOfUsedBuffers()
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.