Class SharedTsBlockQueue


  • @NotThreadSafe
    public class SharedTsBlockQueue
    extends java.lang.Object
    This 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
      void abort()
      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.
      void close()
      Destroy the queue and complete the future.
      long getBufferRetainedSizeInBytes()  
      boolean hasNoMoreTsBlocks()  
      com.google.common.util.concurrent.ListenableFuture<java.lang.Void> isBlocked()  
      boolean isEmpty()  
      org.apache.iotdb.tsfile.read.common.block.TsBlock remove()
      Remove a tsblock from the head of the queue and return.
      void setNoMoreTsBlocks​(boolean noMoreTsBlocks)
      Notify no more tsblocks will be added to the queue.
      void setSinkHandle​(LocalSinkHandle sinkHandle)  
      void setSourceHandle​(LocalSourceHandle sourceHandle)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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)
      • 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 by isBlocked() 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