public TransactionCallback getCallback(final JournalFile file) throws Exception { if (firstCallbackLatch != null && callbackList.isEmpty()) { firstCallbackLatch.countDown(); } currentCallback = callbackList.get(file); if (currentCallback == null) { currentCallback = new TransactionCallback(); callbackList.put(file, currentCallback); } currentCallback.countUp(); return currentCallback; }
public void checkErrorCondition() throws Exception { if (currentCallback != null) { if (currentCallback.getErrorMessage() != null) { throw ActiveMQExceptionType.createException(currentCallback.getErrorCode(), currentCallback.getErrorMessage()); } } }
/** * Wait completion at the latest file only */ public void waitCompletion() throws Exception { waitFirstCallback(); currentCallback.waitCompletion(); }
private void setErrorCondition(IOCallback otherCallback, JournalTransaction jt, Throwable t) { TransactionCallback callback = null; if (jt != null) { callback = jt.getCurrentCallback(); if (callback != null && callback.getErrorMessage() != null) { callback.onError(ActiveMQExceptionType.IO_ERROR.getCode(), t.getMessage()); } } if (otherCallback != null && otherCallback != callback) { otherCallback.onError(ActiveMQExceptionType.IO_ERROR.getCode(), t.getMessage()); } }
txcallback.setDelegateCompletion(parameterCallback);
private void setErrorCondition(IOCallback otherCallback, JournalTransaction jt, Throwable t) { TransactionCallback callback = null; if (jt != null) { callback = jt.getCurrentCallback(); if (callback != null && callback.getErrorMessage() != null) { callback.onError(ActiveMQExceptionType.IO_ERROR.getCode(), t.getMessage()); } } if (otherCallback != null && otherCallback != callback) { otherCallback.onError(ActiveMQExceptionType.IO_ERROR.getCode(), t.getMessage()); } }
txcallback.setDelegateCompletion(parameterCallback);
public void checkErrorCondition() throws Exception { if (currentCallback != null) { if (currentCallback.getErrorMessage() != null) { throw ActiveMQExceptionType.createException(currentCallback.getErrorCode(), currentCallback.getErrorMessage()); } } }
public TransactionCallback getCallback(final JournalFile file) throws Exception { if (firstCallbackLatch != null && callbackList.isEmpty()) { firstCallbackLatch.countDown(); } currentCallback = callbackList.get(file); if (currentCallback == null) { currentCallback = new TransactionCallback(); callbackList.put(file, currentCallback); } currentCallback.countUp(); return currentCallback; }
public void waitCallbacks() throws InterruptedException { waitFirstCallback(); synchronized (callbackList) { for (TransactionCallback callback : callbackList.values()) { callback.waitCompletion(); } } }
/** * Wait completion at the latest file only */ public void waitCompletion() throws Exception { waitFirstCallback(); currentCallback.waitCompletion(); }
public void waitCallbacks() throws InterruptedException { waitFirstCallback(); synchronized (callbackList) { for (TransactionCallback callback : callbackList.values()) { callback.waitCompletion(); } } }