code: public static ResourceClaim claimExpiring(ZooKeeperConnection zooKeeperConnection,
                                                int poolSize,
                                                String znode,
                                                Long timeout)
              throws IOException {
  
          long timeoutNonNull = timeout == null ? DEFAULT_TIMEOUT : timeout;
          logger.debug("Preparing expiring resource-claim; will release it in {}ms.", timeout);
  
          return new ExpiringResourceClaim(zooKeeperConnection, poolSize, znode, timeoutNonNull);
      }
docs: Claim a resource.
  
  @param zooKeeperConnection ZooKeeper connection to use.
  @param poolSize            Size of the resource pool.
  @param znode               Root znode of the ZooKeeper resource-pool.
  @param timeout             Delay in milliseconds before the claim expires.
  @return A resource claim.