public void unlock() throws IOException {
    Threads.shutdown(worker.shutdown());
    try {
      stub.lockHeartbeat(null,
        LockHeartbeatRequest.newBuilder().setProcId(procId).setKeepAlive(false).build());
    } catch (Exception e) {
      throw ProtobufUtil.handleRemoteException(e);
    }
  }
@param timeout in milliseconds. If set to 0, waits indefinitely.
@return true if lock was acquired; and false if waiting time elapsed before lock could be
        acquired.
hbase-server/src/main/java/org/apache/hadoop/hbase/client/locking/EntityLock.java