work = workItems.remove();
}
InputStream in = work.getIn();
try {
LOGGER.debug("BEGIN doWork (%s)", getClass().getName());
PausableTimerContext timerContext = new PausableTimerContext(processingTimeTimer);
if (in instanceof PausableTimerContextAware) {
((PausableTimerContextAware) in).setPausableTimerContext(timerContext);
}
processingCounter.inc();
try {
this.worker.execute(in, work.getData());
} finally {
LOGGER.debug("END doWork (%s)", getClass().getName());
processingCounter.dec();
totalProcessedCounter.inc();
timerContext.stop();
}
synchronized (workResults) {
workResults.add(new WorkResult(null));
workResults.notifyAll();
}