@Override
  protected Flow executeFromState(MasterProcedureEnv env, TState state)
    throws ProcedureSuspendedException, ProcedureYieldException, InterruptedException {
    LOG.trace("{} execute state={}", this, state);
    if (state == getInitialState()) {
      return schedule(env);
    } else if (state == getConfirmState()) {
      return confirm(env);
    } else {
      throw new UnsupportedOperationException("unhandled state=" + state);
    }
  }
Base class for unassigning table regions.
hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/AbstractCloseTableRegionsProcedure.java