java.lang.Object
org.apache.iotdb.confignode.manager.pipe.coordinator.task.PipeTaskCoordinator

public class PipeTaskCoordinator extends Object
  • Constructor Details

  • Method Details

    • tryLock

      public AtomicReference<PipeTaskInfo> 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

      public AtomicReference<PipeTaskInfo> lock()
      Lock the pipe task coordinator.
      Returns:
      the PipeTaskInfo holder, which can be used to get the PipeTaskInfo. 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:
      true if successfully unlocked, false if current thread is not holding the lock.
    • isLocked

      public boolean isLocked()
    • createPipe

      public TSStatus createPipe(TCreatePipeReq req)
      Caller should ensure that the method is called in the lock lock().
    • alterPipe

      public TSStatus alterPipe(TAlterPipeReq req)
      Caller should ensure that the method is called in the lock lock().
    • startPipe

      public TSStatus startPipe(String pipeName)
      Caller should ensure that the method is called in the lock lock().
    • stopPipe

      public TSStatus stopPipe(String pipeName)
      Caller should ensure that the method is called in the lock lock().
    • dropPipe

      public TSStatus dropPipe(TDropPipeReq req)
      Caller should ensure that the method is called in the lock lock().
    • showPipes

      public TShowPipeResp showPipes(TShowPipeReq req)
    • getAllPipeInfo

      public TGetAllPipeInfoResp getAllPipeInfo()
    • hasAnyPipe

      public boolean hasAnyPipe()
    • updateLastSyncedVersion

      public void updateLastSyncedVersion()
      Caller should ensure that the method is called in the write lock of pipeTaskInfo.
    • canSkipNextSync

      public boolean canSkipNextSync()
    • runningPipeCount

      public long runningPipeCount()
    • droppedPipeCount

      public long droppedPipeCount()
    • userStoppedPipeCount

      public long userStoppedPipeCount()
    • exceptionStoppedPipeCount

      public long exceptionStoppedPipeCount()