public EntityLock tableLock(final TableName tableName, final boolean exclusive,
    final String description, final Abortable abort) {
    LockRequest lockRequest = buildLockRequest(exclusive ? LockType.EXCLUSIVE : LockType.SHARED,
      tableName.getNameAsString(), null, null, description, ng.getNonceGroup(), ng.newNonce());
    return new EntityLock(conf, stub, lockRequest, abort);
  }
Create a new EntityLock object to acquire an exclusive or shared lock on a table. Internally,
the table namespace will also be locked in shared mode.
hbase-server/src/main/java/org/apache/hadoop/hbase/client/locking/LockServiceClient.java