@Override public boolean waitForActivation(long timeout, TimeUnit unit) throws InterruptedException { return activationLatch.await(timeout, unit); }
public void waitCompletion() throws InterruptedException { countLatch.await(); if (errorMessage != null) { throw new IllegalStateException("Error on Transaction: " + errorCode + " - " + errorMessage); } }
public void waitCompletion() throws InterruptedException { countLatch.await(); if (errorMessage != null) { throw new IllegalStateException("Error on Transaction: " + errorCode + " - " + errorMessage); } }
public void waitCompletion() throws InterruptedException { countLatch.await(); if (errorMessage != null) { throw new IllegalStateException("Error on Transaction: " + errorCode + " - " + errorMessage); } }
/** * @throws HornetQException * @throws InterruptedException */ private void stopPoller() throws HornetQException, InterruptedException { AsynchronousFileImpl.stopPoller(handler); // We need to make sure we won't call close until Poller is // completely done, or we might get beautiful GPFs pollerLatch.await(); }
/** * @throws HornetQException * @throws InterruptedException */ private void stopPoller() throws HornetQException, InterruptedException { Native.stopPoller(handler); // We need to make sure we won't call close until Poller is // completely done, or we might get beautiful GPFs pollerLatch.await(); }
private boolean flushExecutor() { try { boolean ok = pendingRuns.await(10000); return ok; } catch (InterruptedException e) { HornetQServerLogger.LOGGER.warn(e.getMessage(), e); return false; } }
/** * @throws HornetQException * @throws InterruptedException */ private void stopPoller() throws HornetQException, InterruptedException { Native.stopPoller(handler); // We need to make sure we won't call close until Poller is // completely done, or we might get beautiful GPFs pollerLatch.await(); }
@Override public boolean waitForBackupSync(long timeout, TimeUnit unit) throws InterruptedException { if (configuration.isBackup() && !configuration.isSharedStore()) { return backupSyncLatch.await(timeout, unit); } else { return true; } }
/** * Sending a initial credit for slow consumers * */ private void startSlowConsumer() { if (isTrace) { HornetQClientLogger.LOGGER.trace("Sending 1 credit to start delivering of one message to slow consumer"); } sendCredits(1); try { // We use an executor here to guarantee the messages will arrive in order. // However when starting a slow consumer, we have to guarantee the credit was sent before we can perform any // operations like forceDelivery pendingFlowControl.await(10, TimeUnit.SECONDS); } catch (InterruptedException e) { // will just ignore and forward the ignored Thread.currentThread().interrupt(); } }
while (!pendingWrites.await(60000))
while (!pendingWrites.await(60000))
while (!pendingWrites.await(60000))
/** * This will wait for any pending deliveries to finish */ private boolean flushDeliveriesInTransit() { try { if (deliveriesInTransit.await(DELIVERY_TIMEOUT)) { return true; } else { HornetQServerLogger.LOGGER.timeoutFlushInTransit(getName().toString(), getAddress().toString()); return false; } } catch (Exception e) { HornetQServerLogger.LOGGER.warn(e.getMessage(), e); return false; } }
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); } }
queue.removeConsumer(BridgeImpl.this); if (!pendingAcks.await(10, TimeUnit.SECONDS))