Interface ISourceHandle
-
- All Known Implementing Classes:
LocalSourceHandle,MemorySourceHandle,SourceHandle
public interface ISourceHandle
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidabort()Abort the handle.voidclose()Close the handle.longgetBufferRetainedSizeInBytes()Get the total amount of memory used by buffered tsblocks.org.apache.iotdb.mpp.rpc.thrift.TFragmentInstanceIdgetLocalFragmentInstanceId()Get the local fragment instance ID that this source handle belongs to.java.lang.StringgetLocalPlanNodeId()Get the local plan node ID that this source handle belongs to.booleanisAborted()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.booleanisFinished()If there are more tsblocks.org.apache.iotdb.tsfile.read.common.block.TsBlockreceive()Get aTsBlock.
-
-
-
Method Detail
-
getLocalFragmentInstanceId
org.apache.iotdb.mpp.rpc.thrift.TFragmentInstanceId getLocalFragmentInstanceId()
Get the local fragment instance ID that this source handle belongs to.
-
getLocalPlanNodeId
java.lang.String getLocalPlanNodeId()
Get the local plan node ID that this source handle belongs to.
-
getBufferRetainedSizeInBytes
long getBufferRetainedSizeInBytes()
Get the total amount of memory used by buffered tsblocks.
-
receive
org.apache.iotdb.tsfile.read.common.block.TsBlock receive()
Get aTsBlock. If the source handle is blocked, a null will be returned. ARuntimeExceptionwill be thrown if any error happened.
-
isFinished
boolean isFinished()
If there are more tsblocks.
-
isBlocked
com.google.common.util.concurrent.ListenableFuture<?> isBlocked()
Get a future that will be completed when the input buffer is not empty.
-
isAborted
boolean isAborted()
If this handle is aborted.
-
abort
void abort()
Abort the handle. Discard all tsblocks which may still be in the memory buffer and cancel the future returned byisBlocked().Should only be called in abnormal case
-
close
void close()
Close the handle. Discard all tsblocks which may still be in the memory buffer and complete the future returned byisBlocked().Should only be called in normal case
-
-