@Override public boolean waitForActivation(long timeout, TimeUnit unit) throws InterruptedException { return activationLatch.await(timeout, unit); }
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 countUp() { up++; countLatch.countUp(); }
public void run() { try { queue.removeConsumer(BridgeImpl.this); if (!pendingAcks.await(60, TimeUnit.SECONDS)) { HornetQServerLogger.LOGGER.timedOutWaitingCompletions(BridgeImpl.this.toString(), pendingAcks.getCount()); } synchronized (BridgeImpl.this) { started = false; active = false; } internalCancelReferences(); HornetQServerLogger.LOGGER.bridgePaused(name); } catch (Exception e) { HornetQServerLogger.LOGGER.errorPausingBridge(e); } }
private final ReusableLatch pollerLatch = new ReusableLatch(); private final ReusableLatch pendingWrites = new ReusableLatch();
@Override public boolean isActive() { return activationLatch.getCount() < 1; }
activationLatch.setCount(1);
private final ReusableLatch deliveriesInTransit = new ReusableLatch(0);
if (direct && directDeliver && deliveriesInTransit.getCount() == 0 && deliverDirect(ref))
activationLatch.setCount(1); createNodeManager(configuration.getJournalDirectory(), configuration.getBackupGroupName(), true); backupUpToDate = false; backupSyncLatch.setCount(1); replicationEndpoint = new ReplicationEndpoint(this, shutdownOnCriticalIO, wasLive); activation = new SharedNothingBackupActivation(wasLive);
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 waitCompletion() throws InterruptedException { countLatch.await(); if (errorMessage != null) { throw new IllegalStateException("Error on Transaction: " + errorCode + " - " + errorMessage); } }
public void countUp() { up.incrementAndGet(); countLatch.countUp(); }
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 waitCompletion() throws InterruptedException { countLatch.await(); if (errorMessage != null) { throw new IllegalStateException("Error on Transaction: " + errorCode + " - " + errorMessage); } }