} finally { if (ctx != null) { ctx.stop();
} finally { if (ctx != null) { ctx.stop();
perbatch = doIndexingWithWorldRead(sf, fullTextSession); } finally { timer.stop(); count++;
/** * Handles cleanup of the previously offered {@link Entry} and prepares the * new {@link Entry} for processing. */ private EventLog offer(Entry entry) { // First handle the previously returned if (this.lastReturned != null) { this.lastReturned.timer.stop(); // In case of success Entry last = this.lastReturned.entry; last.pass(); if (last.eventLog >= 0) { setCurrentId(last.eventLog); } log.debug(String.format("Successfully handled %s. Skipped: %s", last, last.skipped)); this.lastReturned = null; } if (entry.state != State.OPEN) { return null; } this.lastReturned = new WrappedEventLog(entry, processTime.time()); return this.lastReturned; }
@Override public void onApplicationEvent(ApplicationEvent arg0) { if (arg0 instanceof EventLogFailure) { EventLogFailure failure = (EventLogFailure) arg0; if (failure.wasSource(this)) { if (lastReturned != failure.log) { log.error("lastReturned is not failure item!"); } lastReturned.timer.stop(); // In case of fail lastReturned = null; // Prevent success later data.fail(failure); } } else { super.onApplicationEvent(arg0); } }
protected List<Object[]> lookup() { final Timer.Context ctx = lookupTime.time(); try { final long current = getCurrentId(); List<Object[]> rv = sql.getEventLogPartitions(types, actions, current, max); log.debug(String.format("objects found searching " + "from %s (max: %s): %s", current, max, rv.size())); return rv; } finally { ctx.stop(); } }
private Object go(EventLog log) { final Timer.Context timer = batchTimer.time(); try { executor.execute(getPrincipal(), new HandleEventLog(log, (PixelDataHandler) work, this, "handleEventLog")); return log; } finally { timer.stop(); } }