code: public static int lock(String name, long timeoutInMilli) {
          if (name.contains("/")) {
              throw new IllegalArgumentException("锁的名称不允许包含'/'，yourLockName= " + name);
          }
          LOG.debug("由于zk单个znode下如果存在过多children会出现zk客户端无法ls列表，和无法rmr的问题，因此加入日期子路径");
          //todo 缺点1、一天的锁数量日后太大时也会有children过多问题
          //todo 缺点2、跨天锁失效
          //todo 以上解决方案：使用一致性哈希将锁分配到固定子路径内去
          //todo 优点、临时解决了我们维护zk困难的问题
          InterProcessMutex lock = new InterProcessMutex(ZkConnection.client, LOCK_ROOT + "/" + DateUtil.getDateStr() + "/" + name);
          int innerId = innerIdGenerator.getAndIncrement();
          try {
              if (!lock.acquire(timeoutInMilli, TimeUnit.MILLISECONDS)) {
                  LOG.info(String.format("获取锁%s超时,超时时间%sms", name, timeoutInMilli));
                  return TIME_OUT_INNER_ID;
              } else {
                  map.put(innerId, lock);
                  return innerId;
              }
          } catch (Throwable e) {
              throw new RuntimeException(e);
          }
      }
docs: lock the named lock
  注意：加锁和解锁必须配对地调用！Each call to acquire that returns true must be balanced by a call to release()
  
  @return the inner id of the lock or -1 if timed out waiting for the lock
  @throws RuntimeException any unknown runtime exception.