public interface OutputBuffer
| Modifier and Type | Method and Description |
|---|---|
void |
abort(OutputBuffers.OutputBufferId bufferId)
Closes the specified output buffer.
|
void |
acknowledge(OutputBuffers.OutputBufferId bufferId,
long token)
Acknowledges the previously received pages from the output buffer.
|
void |
addStateChangeListener(StateMachine.StateChangeListener<BufferState> stateChangeListener)
Add a listener which fires anytime the buffer state changes.
|
void |
destroy()
Destroys the buffer, discarding all pages.
|
void |
enqueue(int partition,
List<SerializedPage> pages)
Adds a split-up page to a specific partition.
|
void |
enqueue(List<SerializedPage> pages)
Adds a split-up page to an unpartitioned buffer.
|
void |
fail()
Fail the buffer, discarding all pages, but blocking readers.
|
com.google.common.util.concurrent.ListenableFuture<BufferResult> |
get(OutputBuffers.OutputBufferId bufferId,
long token,
io.airlift.units.DataSize maxSize)
Gets pages from the output buffer, and acknowledges all pages received from the last
request.
|
OutputBufferInfo |
getInfo()
Gets the current state of this buffer.
|
long |
getPeakMemoryUsage() |
double |
getUtilization()
Get the memory utilization percentage.
|
boolean |
isFinished()
A buffer is finished once no-more-pages has been set and all buffers have been closed
with an abort call.
|
com.google.common.util.concurrent.ListenableFuture<?> |
isFull()
Get a future that will be completed when the buffer is not full.
|
boolean |
isOverutilized()
Check if the buffer is blocking producers.
|
void |
setNoMorePages()
Notify buffer that no more pages will be added.
|
void |
setOutputBuffers(OutputBuffers newOutputBuffers)
Updates the buffer configuration.
|
OutputBufferInfo getInfo()
boolean isFinished()
double getUtilization()
boolean isOverutilized()
void addStateChangeListener(StateMachine.StateChangeListener<BufferState> stateChangeListener)
this when adding a listener in a constructor. Additionally, it is
possible notifications are observed out of order due to the asynchronous execution.void setOutputBuffers(OutputBuffers newOutputBuffers)
com.google.common.util.concurrent.ListenableFuture<BufferResult> get(OutputBuffers.OutputBufferId bufferId, long token, io.airlift.units.DataSize maxSize)
void acknowledge(OutputBuffers.OutputBufferId bufferId, long token)
void abort(OutputBuffers.OutputBufferId bufferId)
com.google.common.util.concurrent.ListenableFuture<?> isFull()
void enqueue(List<SerializedPage> pages)
void enqueue(int partition,
List<SerializedPage> pages)
void setNoMorePages()
void destroy()
void fail()
long getPeakMemoryUsage()
Copyright © 2012–2019. All rights reserved.