Class MemorySourceHandle

    • Constructor Summary

      Constructors 
      Constructor Description
      MemorySourceHandle​(org.apache.iotdb.tsfile.read.common.block.TsBlock result)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void abort()
      Abort the handle.
      void close()
      Close the handle.
      long getBufferRetainedSizeInBytes()
      Get the total amount of memory used by buffered tsblocks.
      org.apache.iotdb.mpp.rpc.thrift.TFragmentInstanceId getLocalFragmentInstanceId()
      Get the local fragment instance ID that this source handle belongs to.
      java.lang.String getLocalPlanNodeId()
      Get the local plan node ID that this source handle belongs to.
      boolean isAborted()
      If this handle is aborted.
      com.google.common.util.concurrent.ListenableFuture<?> isBlocked()
      Get a future that will be completed when the input buffer is not empty.
      boolean isFinished()
      If there are more tsblocks.
      org.apache.iotdb.tsfile.read.common.block.TsBlock receive()
      Get a TsBlock.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MemorySourceHandle

        public MemorySourceHandle​(org.apache.iotdb.tsfile.read.common.block.TsBlock result)
    • Method Detail

      • getLocalFragmentInstanceId

        public org.apache.iotdb.mpp.rpc.thrift.TFragmentInstanceId getLocalFragmentInstanceId()
        Description copied from interface: ISourceHandle
        Get the local fragment instance ID that this source handle belongs to.
        Specified by:
        getLocalFragmentInstanceId in interface ISourceHandle
      • getLocalPlanNodeId

        public java.lang.String getLocalPlanNodeId()
        Description copied from interface: ISourceHandle
        Get the local plan node ID that this source handle belongs to.
        Specified by:
        getLocalPlanNodeId in interface ISourceHandle
      • receive

        public org.apache.iotdb.tsfile.read.common.block.TsBlock receive()
        Description copied from interface: ISourceHandle
        Get a TsBlock. If the source handle is blocked, a null will be returned. A RuntimeException will be thrown if any error happened.
        Specified by:
        receive in interface ISourceHandle
      • isBlocked

        public com.google.common.util.concurrent.ListenableFuture<?> isBlocked()
        Description copied from interface: ISourceHandle
        Get a future that will be completed when the input buffer is not empty.
        Specified by:
        isBlocked in interface ISourceHandle
      • abort

        public void abort()
        Description copied from interface: ISourceHandle
        Abort the handle. Discard all tsblocks which may still be in the memory buffer and cancel the future returned by ISourceHandle.isBlocked().

        Should only be called in abnormal case

        Specified by:
        abort in interface ISourceHandle
      • close

        public void close()
        Description copied from interface: ISourceHandle
        Close the handle. Discard all tsblocks which may still be in the memory buffer and complete the future returned by ISourceHandle.isBlocked().

        Should only be called in normal case

        Specified by:
        close in interface ISourceHandle