Package org.sonatype.scheduling

Examples of org.sonatype.scheduling.TaskState


      // runNow scheduled tasks will _dissapear_ when done. So, the fact they are PRESENT simply
      // means they are not YET complete
      return false;
    }
    else {
      final TaskState state = task.getTaskState();

      if (task.getSchedule() instanceof ManualRunSchedule) {
        // MnuallRunSchedule stuff goes back to SUBMITTED state and sit there for next "kick"
        // but we _know_ it ran once at least if lastRun date != null AND is in some of the following
        // states
View Full Code Here


        // currently we allow editing of:
        // task name
        // task schedule (even to another type)
        // task params
        ScheduledTask<?> task = getNexusScheduler().getTaskById(getScheduledServiceId(request));
        TaskState state = task.getTaskState();
        if (TaskState.RUNNING.equals(state) || TaskState.CANCELLING.equals(state)
            || TaskState.SLEEPING.equals(state)) {
          throw new ResourceException(Status.CLIENT_ERROR_CONFLICT,
              "Task can't be edited while it is being executed or it is in line to be executed");
        }
View Full Code Here

  private String state() {
    try {
      final ScheduledTask<?> reference = //
      TaskHelp.reference(scheduler, this);
      final TaskState state = reference.getTaskState();
      return state.name();
    } catch (final Exception e) {
      return "UNKNOWN";
    }
  }
View Full Code Here

  private String getState() {
    try {
      final ScheduledTask<?> reference = //
      TaskHelp.reference(scheduler, this);
      final TaskState state = reference.getTaskState();
      return state.name();
    } catch (final Exception e) {
      return "UNKNOWN";
    }
  }
View Full Code Here

  private String state() {
    try {
      final ScheduledTask<?> reference = //
      TaskHelp.reference(scheduler, this);
      final TaskState state = reference.getTaskState();
      return state.name();
    } catch (final Exception e) {
      return "UNKNOWN";
    }
  }
View Full Code Here

TOP

Related Classes of org.sonatype.scheduling.TaskState

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.