예제 #1
0
  @ManagedAttribute(description = "A list of IDs of running jobs")
  public List<Long> getRunningJobs() {
    final Job runningJob = jobExecutor.getRunningJob();

    if (runningJob == null) {
      return Collections.emptyList();
    }

    return Arrays.asList(runningJob.getId());
  }
예제 #2
0
 @ManagedAttribute(description = "Indicates whether this JobExecuter is terminating")
 public boolean isTerminating() {
   return jobExecutor.isTerminating();
 }
예제 #3
0
 @ManagedAttribute(description = "The number of processed jobs")
 public Long getProcessedJobs() {
   return jobExecutor.getProcessedJobs();
 }
예제 #4
0
 @ManagedOperation(description = "Terminate JobExecuter")
 public void terminate() {
   jobExecutor.terminate();
 }