static boolean requireTableExclusiveLock(TableProcedureInterface proc) {
    switch (proc.getTableOperationType()) {
      case CREATE:
      case DELETE:
      case DISABLE:
      case ENABLE:
        return true;
      case EDIT:
        // we allow concurrent edit on the ns family in meta table
        return !proc.getTableName().equals(TableProcedureInterface.DUMMY_NAMESPACE_TABLE_NAME);
      case READ:
      case FLUSH:
      case SNAPSHOT:
        return false;
      // region operations are using the shared-lock on the table
      // and then they will grab an xlock on the region.
      case REGION_SPLIT:
      case REGION_MERGE:
      case REGION_ASSIGN:
      case REGION_UNASSIGN:
      case REGION_EDIT:
      case REGION_GC:
      case MERGED_REGIONS_GC:
      case REGION_SNAPSHOT:
      case REGION_TRUNCATE:
        return false;
      default:
        break;
    }
    throw new UnsupportedOperationException("unexpected type " + proc.getTableOperationType());
  }
@param proc must not be null
hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/TableQueue.java