public final boolean hasLock() {
    return locked;
  }
This is used in conjunction with {@link #holdLock(Object)}. If {@link #holdLock(Object)}
returns true, the procedure executor will call acquireLock() once and thereafter not call
{@link #releaseLock(Object)} until the Procedure is done (Normally, it calls release/acquire
around each invocation of {@link #execute(Object)}.
@see #holdLock(Object)
@return true if the procedure has the lock, false otherwise.
hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/Procedure.java