Package org.hive2hive.core.processes.framework

Examples of org.hive2hive.core.processes.framework.RollbackReason


  private static final long serialVersionUID = -107686918145129011L;

  private final RollbackReason reason;

  public ProcessExecutionException(Throwable cause) {
    this(new RollbackReason(cause.getMessage(), cause));
  }
View Full Code Here


  public ProcessExecutionException(Throwable cause) {
    this(new RollbackReason(cause.getMessage(), cause));
  }

  public ProcessExecutionException(String hint) {
    this(new RollbackReason(hint, null));
  }
View Full Code Here

  public ProcessExecutionException(String hint) {
    this(new RollbackReason(hint, null));
  }

  public ProcessExecutionException(String hint, Throwable cause) {
    this(new RollbackReason(hint, cause));
  }
View Full Code Here

    for (Future<RollbackReason> handle : handles) {

      if (!handle.isDone())
        continue;

      RollbackReason result = null;
      try {
        result = handle.get();
      } catch (InterruptedException e) {
        logger.error("Error while checking async component.", e);
      } catch (ExecutionException e) {
View Full Code Here

    process.attachListener(listener);
    process.start().await();

    if (listener.hasFailed()) {
      RollbackReason reason = listener.getRollbackReason();
      print(String.format("The process has failed%s", reason != null ? ": " + reason.getHint() : "."));
    }
    return listener.hasSucceeded();
  }
View Full Code Here

    // verify if content protection keys have changed
    Assert.assertEquals(protectionKeysNew.getPublic(), getter.getDataManager().getUnblocked(parameters)
        .awaitUninterruptibly().getData().publicKey());

    // manually trigger roll back
    step.cancel(new RollbackReason("Testing rollback."));

    // verify if content protection keys have changed to old ones
    Assert.assertEquals(protectionKeysOld.getPublic(), getter.getDataManager().getUnblocked(parameters)
        .awaitUninterruptibly().getData().publicKey());
  }
View Full Code Here

    // verify if content protection keys have changed
    Assert.assertEquals(protectionKeysNew.getPublic(), getter.getDataManager().getUnblocked(parameters)
        .awaitUninterruptibly().getData().publicKey());

    // manually trigger roll back
    step.cancel(new RollbackReason("Testing rollback."));

    // verify if content protection keys have changed to old ones
    Assert.assertEquals(protectionKeysOld.getPublic(), getter.getDataManager().getUnblocked(parameters)
        .awaitUninterruptibly().getData().publicKey());
  }
View Full Code Here

    AsyncComponent component = new AsyncComponent(putStep);
    component.attachListener(listener);

    // start and cancel immediately
    component.start();
    putStep.cancel(new RollbackReason("Testing whether rollback works."));
    UseCaseTestUtil.waitTillFailed(listener, 10);

    Parameters parameters = new Parameters().setLocationKey(userId).setDomainKey(H2HConstants.USER_PROFILE_TASK_DOMAIN)
        .setContentKey(userProfileTask.getContentKey());
    FutureGet futureGet = node.getDataManager().getUnblocked(parameters);
View Full Code Here

TOP

Related Classes of org.hive2hive.core.processes.framework.RollbackReason

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.