public interface BufferProvider
The data producing side (result partition writers) request buffers in a synchronous fashion, whereas the input side requests asynchronously.
Modifier and Type | Method and Description |
---|---|
boolean |
addBufferListener(BufferListener listener)
Adds a buffer availability listener to the buffer provider.
|
int |
getMemorySegmentSize()
Returns the size of the underlying memory segments.
|
boolean |
isDestroyed()
Returns whether the buffer provider has been destroyed.
|
Buffer |
requestBuffer()
Returns a
Buffer instance from the buffer provider, if one is available. |
Buffer |
requestBufferBlocking()
Returns a
Buffer instance from the buffer provider. |
BufferBuilder |
requestBufferBuilderBlocking()
Returns a
BufferBuilder instance from the buffer provider. |
Buffer requestBuffer() throws IOException
Buffer
instance from the buffer provider, if one is available.
Returns null
if no buffer is available or the buffer provider has been destroyed.
IOException
Buffer requestBufferBlocking() throws IOException, InterruptedException
Buffer
instance from the buffer provider.
If there is no buffer available, the call will block until one becomes available again or the buffer provider has been destroyed.
IOException
InterruptedException
BufferBuilder requestBufferBuilderBlocking() throws IOException, InterruptedException
BufferBuilder
instance from the buffer provider.
If there is no buffer available, the call will block until one becomes available again or the buffer provider has been destroyed.
IOException
InterruptedException
boolean addBufferListener(BufferListener listener)
The operation fails with return value false
, when there is a buffer available or
the buffer provider has been destroyed.
boolean isDestroyed()
int getMemorySegmentSize()
Buffer
instance can have.Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.