Examples of ServiceStateException


Examples of com.brienwheeler.lib.svc.ServiceStateException

 
  protected void ensureState(ServiceState expected, String message)
  {
    ServiceState current = state.get();
    if (current != expected)
      throw new ServiceStateException(message + " [" + current.toString() + "]");
  }
View Full Code Here

Examples of com.brienwheeler.lib.svc.ServiceStateException

    try {
      return work.doServiceWork();
    }
    catch (InterruptedException e) {
      Thread.currentThread().interrupt();
      throw new ServiceStateException("service operation interrupted", e);
    }
    finally {
      synchronized (state) {
        serviceThreads.remove(Thread.currentThread());
        state.notifyAll();
View Full Code Here

Examples of org.apache.hadoop.service.ServiceStateException

      log.debug("Not starting next service -{} is stopped", this);
      return false;
    }
    if (!isInState(STATE.STARTED)) {
      //reject attempts to start a service too early
      throw new ServiceStateException(
        "Cannot start a child service when not started");
    }
    if (serviceList.isEmpty()) {
      //nothing left to run
      return false;
View Full Code Here

Examples of org.apache.hadoop.service.ServiceStateException

  }

  @Override //AbstractService
  protected void serviceStart() throws Exception {
    if (process == null) {
      throw new ServiceStateException("Subprocess not yet configured");
    }
    //now spawn the process -expect updates via callbacks
    process.spawnApplication();
  }
View Full Code Here

Examples of org.apache.hadoop.service.ServiceStateException

  }

  @Override //AbstractService
  protected void serviceStart() throws Exception {
    if (process == null) {
      throw new ServiceStateException("Process not yet configured");
    }
    //now spawn the process -expect updates via callbacks
    process.start();
  }
View Full Code Here

Examples of org.apache.hadoop.service.ServiceStateException

      LOG.debug("Not starting next service -{} is stopped", this);
      return false;
    }
    if (!isInState(STATE.STARTED)) {
      //reject attempts to start a service too early
      throw new ServiceStateException(
        "Cannot start a child service when not started");
    }
    if (serviceList.isEmpty()) {
      //nothing left to run
      return false;
View Full Code Here

Examples of org.apache.hadoop.service.ServiceStateException

    }
  }

  void finish() {
    if (fail) {
      ServiceStateException e =
          new ServiceStateException(getName() + " failed");

      noteFailure(e);
      stop();
      throw e;
    } else {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.