public void run() { try { pollEvents(); } finally { // This gives us extra protection in cases of interruption // Case the poller thread is interrupted, this will allow us to // restart the thread when required poller = null; pollerLatch.countDown(); } } }
public void run() { try { pollEvents(); } finally { // This gives us extra protection in cases of interruption // Case the poller thread is interrupted, this will allow us to // restart the thread when required poller = null; pollerLatch.countDown(); } } }
public void run() { try { pollEvents(); } finally { // This gives us extra protection in cases of interruption // Case the poller thread is interrupted, this will allow us to // restart the thread when required poller = null; pollerLatch.countDown(); } } }
public void run() { try { runnable.run(); } finally { pendingRuns.countDown(); } } });
public void done() { countLatch.countDown(); if (++done == up.get() && delegateCompletion != null) { final IOAsyncTask delegateToCall = delegateCompletion; // We need to set the delegateCompletion to null first or blocking commits could miss a callback // What would affect mainly tests delegateCompletion = null; delegateToCall.done(); } }
public void onError(final int errorCode, final String errorMessage) { this.errorMessage = errorMessage; this.errorCode = errorCode; countLatch.countDown(); if (delegateCompletion != null) { delegateCompletion.onError(errorCode, errorMessage); } }
public void done() { countLatch.countDown(); if (++done == up && delegateCompletion != null) { final IOAsyncTask delegateToCall = delegateCompletion; // We need to set the delegateCompletion to null first or blocking commits could miss a callback // What would affect mainly tests delegateCompletion = null; delegateToCall.done(); } }
public void onError(final int errorCode, final String errorMessage) { this.errorMessage = errorMessage; this.errorCode = errorCode; countLatch.countDown(); if (delegateCompletion != null) { delegateCompletion.onError(errorCode, errorMessage); } }
public void onError(final int errorCode, final String errorMessage) { this.errorMessage = errorMessage; this.errorCode = errorCode; countLatch.countDown(); if (delegateCompletion != null) { delegateCompletion.onError(errorCode, errorMessage); } }
public void done() { countLatch.countDown(); if (++done == up.get() && delegateCompletion != null) { final IOAsyncTask delegateToCall = delegateCompletion; // We need to set the delegateCompletion to null first or blocking commits could miss a callback // What would affect mainly tests delegateCompletion = null; delegateToCall.done(); } }
public void setRemoteBackupUpToDate() { backupManager.announceBackup(); backupUpToDate = true; backupSyncLatch.countDown(); }
public void run() { try { channel.send(new SessionConsumerFlowCreditMessage(id, credits)); } finally { pendingFlowControl.countDown(); } } });
pendingWrites.countDown();
pendingWrites.countDown();
public void sendAcknowledged(final Message message) { if (active) { try { final MessageReference ref = refs.poll(); if (ref != null) { if (isTrace) { HornetQServerLogger.LOGGER.trace(this + " Acking " + ref + " on queue " + ref.getQueue()); } ref.getQueue().acknowledge(ref); pendingAcks.countDown(); } } catch (Exception e) { HornetQServerLogger.LOGGER.bridgeFailedToAck(e); } } }
private void proceedDeliver(Consumer consumer, MessageReference reference) { try { consumer.proceedDeliver(reference); } catch (Throwable t) { HornetQServerLogger.LOGGER.removingBadConsumer(t, consumer, reference); synchronized (this) { // If the consumer throws an exception we remove the consumer try { removeConsumer(consumer); } catch (Exception e) { HornetQServerLogger.LOGGER.errorRemovingConsumer(e); } // The message failed to be delivered, hence we try again addHead(reference); } } finally { deliveriesInTransit.countDown(); } }
public void run() { try { if (configuration.isClustered() && configuration.isCheckForLiveServer() && isNodeIdUsed()) { configuration.setBackup(true); return; } initialisePart1(); initialisePart2(); state = SERVER_STATE.STARTED; remotingService.startAcceptors(); activationLatch.countDown(); if (identity != null) { HornetQServerLogger.LOGGER.serverIsLive(identity); } else { HornetQServerLogger.LOGGER.serverIsLive(); } } catch (Exception e) { HornetQServerLogger.LOGGER.initializationError(e); } }