docs: private Boolean acquireLock(final BooleanMutex mutex) {
          try {
              do {
                  if (id == null) {// 构建当前lock的唯一标识
                      long sessionId = getSessionId();
                      String prefix = "x-" + sessionId + "-";
                      // 如果第一次，则创建一个节点
                      String path = zookeeper.create(root + "/" + prefix, data, CreateMode.EPHEMERAL_SEQUENTIAL);
                      int index = path.lastIndexOf("/");
                      id = StringUtils.substring(path, index + 1);
                      idName = new LockNode(id);
                  }
  
                  if (id != null) {
                      List<String> names = zookeeper.getChildren(root);
                      if (names.isEmpty()) {
                          logger.warn("lock lost with scene:empty list, id[] and node[]", id, idName);
                          unlock();// 异常情况，退出后重新创建一个
                      } else {
                          // 对节点进行排序
                          SortedSet<LockNode> sortedNames = new TreeSet<LockNode>();
                          for (String name : names) {
                              sortedNames.add(new LockNode(name));
                          }
  
                          if (sortedNames.contains(idName) == false) {
                              logger.warn("lock lost with scene:not contains ,id[] and node[]", id, idName);
                              unlock();// 异常情况，退出后重新创建一个
                              continue;
                          }
  
                          // 将第一个节点做为ownerId
                          ownerId = sortedNames.first().getName();
                          if (mutex != null && isOwner()) {
                              mutex.set(true);// 直接更新状态，返回
                              return true;
                          } else if (mutex == null) {
                              return isOwner();
                          }
  
                          SortedSet<LockNode> lessThanMe = sortedNames.headSet(idName);
                          if (!lessThanMe.isEmpty()) {
                              // 关注一下排队在自己之前的最近的一个节点
                              LockNode lastChildName = lessThanMe.last();
                              lastChildId = lastChildName.getName();
                              // 异步watcher处理
                              IZkConnection connection = zookeeper.getConnection();
                              // zkclient包装的是一个持久化的zk，分布式lock只需要一次性的watcher，需要调用原始的zk链接进行操作
                              ZooKeeper orginZk = ((ZooKeeperx) connection).getZookeeper();
                              Stat stat = orginZk.exists(root + "/" + lastChildId, new AsyncWatcher() {
  
                                  public void asyncProcess(WatchedEvent event) {
                                      if (!mutex.state()) { // 避免重复获取lock
                                          acquireLock(mutex);
                                      } else {
                                          logger.warn("locked successful.");
                                      }
                                  }
  
                              });
  
                              if (stat == null) {
                                  acquireLock(mutex);// 如果节点不存在，需要自己重新触发一下，watcher不会被挂上去
                              }
                          } else {
                              if (isOwner()) {
                                  mutex.set(true);
                              } else {
                                  logger.warn("lock lost with scene:no less ,id[] and node[]", id, idName);
                                  unlock();// 可能自己的节点已超时挂了，所以id和ownerId不相同
                              }
                          }
                      }
                  }
              } while (id == null);
          } catch (KeeperException e) {
              exception = e;
              if (mutex != null) {
                  mutex.set(true);
              }
          } catch (InterruptedException e) {
              interrupt = e;
              if (mutex != null) {
                  mutex.set(true);
              }
          } catch (Throwable e) {
              other = e;
              if (mutex != null) {
                  mutex.set(true);
              }
          }
  
          if (isOwner() && mutex != null) {
              mutex.set(true);
          }
          return Boolean.FALSE;
      }