return;
}
_nodeCount += result.getResultItems().size();
_executionTime += result.getDuration();
}
final ExecutingGraph graph = getGraph();
_notifyLock.incrementAndGet();
graph.jobCompleted(result.getSpecification());
s_logger.debug("{} completed for {}", result, this);
submitExecutableJobs();
getCycle().jobCompleted(job.getJob(), result);
if (_notifyLock.decrementAndGet() == 0) {
if (graph.isFinished()) {
// If the lock count is still 0, then we will notify completion. If another thread caused graph completion, and is still notifying
// the job completion, the count will be positive. If another thread caused graph completion and got here before us then the count
// will already be -1.
if (_notifyLock.compareAndSet(0, -1)) {
final long duration = notifyComplete();
getStatisticsGatherer().graphExecuted(graph.getCalculationConfiguration(), _nodeCount, _executionTime, duration);
}
}
}
}