Class PipeTaskCoordinator
java.lang.Object
org.apache.iotdb.confignode.manager.pipe.coordinator.task.PipeTaskCoordinator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionalterPipe(TAlterPipeReq req) Caller should ensure that the method is called in the locklock().booleancreatePipe(TCreatePipeReq req) Caller should ensure that the method is called in the locklock().longdropPipe(TDropPipeReq req) Caller should ensure that the method is called in the locklock().longbooleanbooleanisLocked()lock()Lock the pipe task coordinator.longshowPipes(TShowPipeReq req) Caller should ensure that the method is called in the locklock().Caller should ensure that the method is called in the locklock().tryLock()Lock the pipe task coordinator.booleanunlock()Unlock the pipe task coordinator.voidCaller should ensure that the method is called in the write lock ofpipeTaskInfo.long
-
Constructor Details
-
PipeTaskCoordinator
-
-
Method Details
-
tryLock
Lock the pipe task coordinator.- Returns:
- the pipe task info holder, which can be used to get the pipe task info. The holder is null if the lock is not acquired.
-
lock
Lock the pipe task coordinator.- Returns:
- the
PipeTaskInfoholder, which can be used to get thePipeTaskInfo. Wait until lock is acquired
-
unlock
public boolean unlock()Unlock the pipe task coordinator. Calling this method will clear the pipe task info holder, which means that the holder will be null after calling this method.- Returns:
trueif successfully unlocked,falseif current thread is not holding the lock.
-
isLocked
public boolean isLocked() -
createPipe
Caller should ensure that the method is called in the locklock(). -
alterPipe
Caller should ensure that the method is called in the locklock(). -
startPipe
Caller should ensure that the method is called in the locklock(). -
stopPipe
Caller should ensure that the method is called in the locklock(). -
dropPipe
Caller should ensure that the method is called in the locklock(). -
showPipes
-
getAllPipeInfo
-
hasAnyPipe
public boolean hasAnyPipe() -
updateLastSyncedVersion
public void updateLastSyncedVersion()Caller should ensure that the method is called in the write lock ofpipeTaskInfo. -
canSkipNextSync
public boolean canSkipNextSync() -
runningPipeCount
public long runningPipeCount() -
droppedPipeCount
public long droppedPipeCount() -
userStoppedPipeCount
public long userStoppedPipeCount() -
exceptionStoppedPipeCount
public long exceptionStoppedPipeCount()
-