Class SharedTsBlockQueue
- java.lang.Object
-
- org.apache.iotdb.db.mpp.execution.exchange.SharedTsBlockQueue
-
@NotThreadSafe public class SharedTsBlockQueue extends java.lang.ObjectThis is not thread safe class, the caller should ensure multi-threads safety.
-
-
Constructor Summary
Constructors Constructor Description SharedTsBlockQueue(org.apache.iotdb.mpp.rpc.thrift.TFragmentInstanceId fragmentInstanceId, LocalMemoryManager localMemoryManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidabort()Destroy the queue and cancel the future.com.google.common.util.concurrent.ListenableFuture<java.lang.Void>add(org.apache.iotdb.tsfile.read.common.block.TsBlock tsBlock)Add tsblocks to the queue.voidclose()Destroy the queue and complete the future.longgetBufferRetainedSizeInBytes()booleanhasNoMoreTsBlocks()com.google.common.util.concurrent.ListenableFuture<java.lang.Void>isBlocked()booleanisEmpty()org.apache.iotdb.tsfile.read.common.block.TsBlockremove()Remove a tsblock from the head of the queue and return.voidsetNoMoreTsBlocks(boolean noMoreTsBlocks)Notify no more tsblocks will be added to the queue.voidsetSinkHandle(LocalSinkHandle sinkHandle)voidsetSourceHandle(LocalSourceHandle sourceHandle)
-
-
-
Constructor Detail
-
SharedTsBlockQueue
public SharedTsBlockQueue(org.apache.iotdb.mpp.rpc.thrift.TFragmentInstanceId fragmentInstanceId, LocalMemoryManager localMemoryManager)
-
-
Method Detail
-
hasNoMoreTsBlocks
public boolean hasNoMoreTsBlocks()
-
getBufferRetainedSizeInBytes
public long getBufferRetainedSizeInBytes()
-
isBlocked
public com.google.common.util.concurrent.ListenableFuture<java.lang.Void> isBlocked()
-
isEmpty
public boolean isEmpty()
-
setSinkHandle
public void setSinkHandle(LocalSinkHandle sinkHandle)
-
setSourceHandle
public void setSourceHandle(LocalSourceHandle sourceHandle)
-
setNoMoreTsBlocks
public void setNoMoreTsBlocks(boolean noMoreTsBlocks)
Notify no more tsblocks will be added to the queue.
-
remove
public org.apache.iotdb.tsfile.read.common.block.TsBlock remove()
Remove a tsblock from the head of the queue and return. Should be invoked only when the future returned byisBlocked()completes.
-
add
public com.google.common.util.concurrent.ListenableFuture<java.lang.Void> add(org.apache.iotdb.tsfile.read.common.block.TsBlock tsBlock)
Add tsblocks to the queue. Except the first invocation, this method should be invoked only when the returned future of last invocation completes.
-
close
public void close()
Destroy the queue and complete the future. Should only be called in normal case
-
abort
public void abort()
Destroy the queue and cancel the future. Should only be called in abnormal case
-
-