Package io.trino.operator
Class StreamingDirectExchangeBuffer
- java.lang.Object
-
- io.trino.operator.StreamingDirectExchangeBuffer
-
- All Implemented Interfaces:
DirectExchangeBuffer,Closeable,AutoCloseable
public class StreamingDirectExchangeBuffer extends Object implements DirectExchangeBuffer
-
-
Constructor Summary
Constructors Constructor Description StreamingDirectExchangeBuffer(Executor executor, io.airlift.units.DataSize bufferCapacity)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPages(TaskId taskId, List<io.airlift.slice.Slice> pages)voidaddTask(TaskId taskId)voidclose()intgetBufferedPageCount()longgetMaxRetainedSizeInBytes()longgetRemainingCapacityInBytes()longgetRetainedSizeInBytes()longgetSpilledBytes()intgetSpilledPageCount()com.google.common.util.concurrent.ListenableFuture<Void>isBlocked()This method may be called by multiple independent client concurrently.booleanisFailed()booleanisFinished()voidnoMoreTasks()io.airlift.slice.SlicepollPage()voidtaskFailed(TaskId taskId, Throwable t)voidtaskFinished(TaskId taskId)
-
-
-
Constructor Detail
-
StreamingDirectExchangeBuffer
public StreamingDirectExchangeBuffer(Executor executor, io.airlift.units.DataSize bufferCapacity)
-
-
Method Detail
-
isBlocked
public com.google.common.util.concurrent.ListenableFuture<Void> isBlocked()
Description copied from interface:DirectExchangeBufferThis method may be called by multiple independent client concurrently. Implementations must ensure the cancellation of a future by one of the clients doesn't cancel futures obtained by other clients.- Specified by:
isBlockedin interfaceDirectExchangeBuffer
-
pollPage
public io.airlift.slice.Slice pollPage()
- Specified by:
pollPagein interfaceDirectExchangeBuffer
-
addTask
public void addTask(TaskId taskId)
- Specified by:
addTaskin interfaceDirectExchangeBuffer
-
addPages
public void addPages(TaskId taskId, List<io.airlift.slice.Slice> pages)
- Specified by:
addPagesin interfaceDirectExchangeBuffer
-
taskFinished
public void taskFinished(TaskId taskId)
- Specified by:
taskFinishedin interfaceDirectExchangeBuffer
-
taskFailed
public void taskFailed(TaskId taskId, Throwable t)
- Specified by:
taskFailedin interfaceDirectExchangeBuffer
-
noMoreTasks
public void noMoreTasks()
- Specified by:
noMoreTasksin interfaceDirectExchangeBuffer
-
isFinished
public boolean isFinished()
- Specified by:
isFinishedin interfaceDirectExchangeBuffer
-
isFailed
public boolean isFailed()
- Specified by:
isFailedin interfaceDirectExchangeBuffer
-
getRemainingCapacityInBytes
public long getRemainingCapacityInBytes()
- Specified by:
getRemainingCapacityInBytesin interfaceDirectExchangeBuffer
-
getRetainedSizeInBytes
public long getRetainedSizeInBytes()
- Specified by:
getRetainedSizeInBytesin interfaceDirectExchangeBuffer
-
getMaxRetainedSizeInBytes
public long getMaxRetainedSizeInBytes()
- Specified by:
getMaxRetainedSizeInBytesin interfaceDirectExchangeBuffer
-
getBufferedPageCount
public int getBufferedPageCount()
- Specified by:
getBufferedPageCountin interfaceDirectExchangeBuffer
-
getSpilledBytes
public long getSpilledBytes()
- Specified by:
getSpilledBytesin interfaceDirectExchangeBuffer
-
getSpilledPageCount
public int getSpilledPageCount()
- Specified by:
getSpilledPageCountin interfaceDirectExchangeBuffer
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceDirectExchangeBuffer
-
-