public interface BufferPool extends BufferProvider, BufferRecycler
AvailabilityProvider.AvailabilityHelperBufferRecycler.DummyBufferRecyclerAVAILABLE| 限定符和类型 | 方法和说明 |
|---|---|
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, requestMemorySegmentBlockingand, getAvailableFuture, isApproximatelyAvailable, isAvailable, orrecyclevoid reserveSegments(int numberOfSegmentsToReserve)
throws IOException
IOExceptionvoid lazyDestroy()
If not all buffers are available, they are recycled lazily as soon as they are recycled.
boolean isDestroyed()
isDestroyed 在接口中 BufferProviderint 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–2022 The Apache Software Foundation. All rights reserved.