Package org.hive2hive.core.processes.framework.exceptions

Examples of org.hive2hive.core.processes.framework.exceptions.InvalidProcessStateException


  @Override
  public IProcessComponent start() throws InvalidProcessStateException {
    logger.debug("Executing '{}'.", this.getClass().getSimpleName());

    if (state != ProcessState.READY) {
      throw new InvalidProcessStateException(state);
    }
    state = ProcessState.RUNNING;
    isRollbacking = false;

    try {
View Full Code Here


  }

  @Override
  public void pause() throws InvalidProcessStateException {
    if (state != ProcessState.RUNNING && state != ProcessState.ROLLBACKING) {
      throw new InvalidProcessStateException(state);
    }
    state = ProcessState.PAUSED;
    doPause();
  }
View Full Code Here

  }

  @Override
  public void resume() throws InvalidProcessStateException {
    if (state != ProcessState.PAUSED) {
      throw new InvalidProcessStateException(state);
    }
    // TODO don't distinguish between running and rollback state, each component should be able to decide
    // itself (decorators must implement both methods but cannot decide, they can just forward resume())
    if (!isRollbacking) {
      state = ProcessState.RUNNING;
View Full Code Here

  }

  @Override
  public void cancel(RollbackReason reason) throws InvalidProcessStateException {
    if (state != ProcessState.RUNNING && state != ProcessState.PAUSED && state != ProcessState.SUCCEEDED) {
      throw new InvalidProcessStateException(state);
    }

    // inform parent (if exists and not informed yet)
    if (parent != null && parent.getState() != ProcessState.ROLLBACKING) {
      getParent().cancel(reason);
View Full Code Here

TOP

Related Classes of org.hive2hive.core.processes.framework.exceptions.InvalidProcessStateException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.