@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()); }
@ManagedAttribute(description = "Indicates whether this JobExecuter is terminating") public boolean isTerminating() { return jobExecutor.isTerminating(); }
@ManagedAttribute(description = "The number of processed jobs") public Long getProcessedJobs() { return jobExecutor.getProcessedJobs(); }
@ManagedOperation(description = "Terminate JobExecuter") public void terminate() { jobExecutor.terminate(); }