@Override public void committed() { notificationProcessor.notificationProcessed(notification); }
@Override public void committed() { notificationProcessor.notificationProcessed(notification); }
@Override public void alreadyAcknowledged() { notificationFinder.failedToProcess(notification, TxResult.AACKED); notificationProcessor.notificationProcessed(notification); }
@Override public void alreadyAcknowledged() { notificationFinder.failedToProcess(notification, TxResult.AACKED); notificationProcessor.notificationProcessed(notification); }
@Override public void failed(Throwable t) { notificationFinder.failedToProcess(notification, TxResult.ERROR); notificationProcessor.notificationProcessed(notification); log.error("Failed to process work " + Hex.encNonAscii(notification), t); }
@Override public void failed(Throwable t) { notificationFinder.failedToProcess(notification, TxResult.ERROR); notificationProcessor.notificationProcessed(notification); log.error("Failed to process work " + Hex.encNonAscii(notification), t); }
@Override public void run() { try { // Its possible that while the notification was in the queue the situation changed and it // should no longer be processed by this worker. So ask as late as possible if this // notification should be processed. if (notificationFinder.shouldProcess(notification)) { workTask.run(); } else { notificationProcessed(notification); } } catch (Exception e) { log.error("Failed to process work " + Hex.encNonAscii(notification), e); } }
@Override public void run() { try { // Its possible that while the notification was in the queue the situation changed and it // should no longer be processed by this worker. So ask as late as possible if this // notification should be processed. if (notificationFinder.shouldProcess(notification)) { workTask.run(); } else { notificationProcessed(notification); } } catch (Exception e) { log.error("Failed to process work " + Hex.encNonAscii(notification), e); } }
@Override public void run() { Observer observer = observers.getObserver(notification.getColumn()); String observerId = observers.getObserverId(notification.getColumn()); try { AsyncTransaction atx = new TransactionImpl(env, notification); if (TracingTransaction.isTracingEnabled()) { atx = new TracingTransaction(atx, notification, observer.getClass(), observerId); } try { observer.process(atx, notification.getRow(), notification.getColumn()); } catch (Exception e) { notificationFinder.failedToProcess(notification, TxResult.ERROR); notificationProcessor.notificationProcessed(notification); throw e; } CommitManager commitManager = env.getSharedResources().getCommitManager(); commitManager.beginCommit(atx, observerId, new WorkTaskCommitObserver()); } catch (Exception e) { log.error("Failed to process work " + Hex.encNonAscii(notification), e); } finally { observers.returnObserver(observer); } } }
@Override public void run() { Observer observer = observers.getObserver(notification.getColumn()); String observerId = observers.getObserverId(notification.getColumn()); try { AsyncTransaction atx = new TransactionImpl(env, notification); if (TracingTransaction.isTracingEnabled()) { atx = new TracingTransaction(atx, notification, observer.getClass(), observerId); } try { observer.process(atx, notification.getRow(), notification.getColumn()); } catch (Exception e) { notificationFinder.failedToProcess(notification, TxResult.ERROR); notificationProcessor.notificationProcessed(notification); throw e; } CommitManager commitManager = env.getSharedResources().getCommitManager(); commitManager.beginCommit(atx, observerId, new WorkTaskCommitObserver()); } catch (Exception e) { log.error("Failed to process work " + Hex.encNonAscii(notification), e); } finally { observers.returnObserver(observer); } } }