public boolean tryLock() {
    try {
      final long id = idGenerator.incrementAndGet();
      LOGGER.info(
          "PipeTaskCoordinator lock (id: {}) waiting for thread {}",
          id,
          Thread.currentThread().getName());
      if (deque.offer(id, 10, TimeUnit.SECONDS)) {
        LOGGER.info(
            "PipeTaskCoordinator lock (id: {}) acquired by thread {}",
            id,
            Thread.currentThread().getName());
        return true;
      } else {
        LOGGER.info(
            "PipeTaskCoordinator lock (id: {}) failed to acquire by thread {} because of timeout",
            id,
            Thread.currentThread().getName());
        return false;
      }
    } catch (InterruptedException e) {
      Thread.currentThread().interrupt();
      LOGGER.error(
          "Interrupted while waiting for PipeTaskCoordinator lock, current thread: {}",
          Thread.currentThread().getName());
      return false;
    }
  }
{@link PipeTaskCoordinatorLock} is a cross thread lock for pipe task coordinator. It is used to
ensure that only one thread can execute the pipe task coordinator at the same time.
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/pipe/coordinator/task/PipeTaskCoordinatorLock.java