public interface BufferProvider extends AvailabilityProvider
The data producing side (result partition writers) request buffers in a synchronous fashion, whereas the input side requests asynchronously.
AvailabilityProvider.AvailabilityHelperAVAILABLE| Modifier and Type | Method and Description |
|---|---|
boolean |
addBufferListener(BufferListener listener)
Adds a buffer availability listener to the buffer provider.
|
boolean |
isDestroyed()
Returns whether the buffer provider has been destroyed.
|
Buffer |
requestBuffer()
Returns a
Buffer instance from the buffer provider, if one is available. |
BufferBuilder |
requestBufferBuilderBlocking()
Returns a
BufferBuilder instance from the buffer provider. |
getAvailableFuture, isApproximatelyAvailable, isAvailableBuffer 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.
IOExceptionBufferBuilder 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.
IOExceptionInterruptedExceptionboolean 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()
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.