public void run() { try { Future<JiffleExecutorResult> future = completionService.poll(); if (future != null) { JiffleExecutorResult result = future.get(); numTasksRunning-- ; if (result.isCompleted()) { if (LOGGER.isLoggable(Level.INFO)) { LOGGER.log(Level.INFO, TASK_SUCCESS_MSG, result.getTaskID()); } notifySuccess(result); } else { if (LOGGER.isLoggable(Level.INFO)) { LOGGER.log(Level.INFO, TASK_FAILURE_MSG, result.getTaskID()); } notifyFailure(result); } } } catch (Exception ex) { throw new RuntimeException(ex); } }
public void run() { try { Future<JiffleExecutorResult> future = completionService.poll(); if (future != null) { JiffleExecutorResult result = future.get(); numTasksRunning-- ; if (result.isCompleted()) { if (LOGGER.isLoggable(Level.INFO)) { LOGGER.log(Level.INFO, TASK_SUCCESS_MSG, result.getTaskID()); } notifySuccess(result); } else { if (LOGGER.isLoggable(Level.INFO)) { LOGGER.log(Level.INFO, TASK_FAILURE_MSG, result.getTaskID()); } notifyFailure(result); } } } catch (Exception ex) { throw new RuntimeException(ex); } }