@Override public synchronized boolean maxConcurrentExecutionsReached() { return this.taskExplorer.getRunningTaskExecutionCount() >= taskConfigurationProperties .getMaximumConcurrentTasks(); }
private synchronized boolean maxConcurrentExecutionsReached() { return this.taskExplorer.getRunningTaskExecutionCount() >= this.taskConfigurationProperties .getMaximumConcurrentTasks(); }
@RequestMapping(value = "/current", method = RequestMethod.GET) @ResponseStatus(HttpStatus.OK) public CurrentTaskExecutionsResource getCurrentTaskExecutionsInfo() { CurrentTaskExecutionsResource currentTaskExecutionsResource = new CurrentTaskExecutionsResource(); currentTaskExecutionsResource.setRunningExecutionCount(explorer.getRunningTaskExecutionCount()); currentTaskExecutionsResource.setMaximumTaskExecutions(taskExecutionInfoService.getMaximumConcurrentTasks()); return currentTaskExecutionsResource; }
@RequestMapping(value = "/current", method = RequestMethod.GET) @ResponseStatus(HttpStatus.OK) public CurrentTaskExecutionsResource getCurrentTaskExecutionsInfo() { CurrentTaskExecutionsResource currentTaskExecutionsResource = new CurrentTaskExecutionsResource(); currentTaskExecutionsResource.setRunningExecutionCount(explorer.getRunningTaskExecutionCount()); currentTaskExecutionsResource.setMaximumTaskExecutions(taskService.getMaximumConcurrentTasks()); return currentTaskExecutionsResource; }