@Override public void run() { try { Topic.this.taskRunner.wakeup(); } catch (InterruptedException e) { } } };
private void asyncWakeup() { try { pendingWakeups.incrementAndGet(); this.taskRunner.wakeup(); } catch (InterruptedException e) { LOG.warn("Async task runner failed to wakeup ", e); } }
public void reconnect() { LOG.debug("Waking up reconnect task"); try { reconnectTask.wakeup(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } }
public void reconnect(boolean rebalance) { synchronized (reconnectMutex) { if (started) { if (rebalance) { doRebalance = true; } LOG.debug("Waking up reconnect task"); try { reconnectTask.wakeup(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } } else { LOG.debug("Reconnect was triggered but transport is not started yet. Wait for start to connect the transport."); } } }
public void onUsageChanged(Usage usage, int oldPercentUsage, int newPercentUsage) { // Do we need to start evicting cache entries? Usage > than the // high mark if (oldPercentUsage < newPercentUsage && usage.getPercentUsage() >= usageHighMark) { try { evictionTask.wakeup(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } } }
protected void wakeup() { if (async && started.get()) { try { getTaskRunner().wakeup(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } catch (TransportDisposedIOException e) { } } }
/** * When we checkpoint we move all the journalled data to long term storage. * */ public void checkpoint(boolean sync, boolean fullCheckpoint) { try { if (journal == null) { throw new IllegalStateException("Journal is closed."); } long now = System.currentTimeMillis(); CountDownLatch latch = null; synchronized (this) { latch = nextCheckpointCountDownLatch; lastCheckpointRequest = now; if (fullCheckpoint) { this.fullCheckPoint = true; } } checkpointTask.wakeup(); if (sync) { LOG.debug("Waking for checkpoint to complete."); latch.await(); } } catch (InterruptedException e) { Thread.currentThread().interrupt(); LOG.warn("Request to start checkpoint failed: " + e, e); } }
@Override public void onException(IOException error) { try { synchronized (reconnectMutex) { if (transport == null || !transport.isConnected()) { return; } LOG.debug("Transport failed, starting up reconnect task", error); ServiceSupport.dispose(transport); transport = null; connectedCount--; if (primary == this) { primary = null; } reconnectTask.wakeup(); } } catch (InterruptedException e) { Thread.currentThread().interrupt(); if (transportListener != null) { transportListener.onException(new InterruptedIOException()); } } } }
reconnectTask.wakeup(); } else if (!isDisposed()) { propagateFailureToExceptionListener(e);
@Override public void dispatchAsync(Command message) { if (!stopping.get()) { if (taskRunner == null) { dispatchSync(message); } else { synchronized (dispatchQueue) { dispatchQueue.add(message); } try { taskRunner.wakeup(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } } } else { if (message.isMessageDispatch()) { MessageDispatch md = (MessageDispatch) message; TransmitCallback sub = md.getTransmitCallback(); broker.postProcessDispatch(md); if (sub != null) { sub.onFailure(); } } } }
public void wakeup() { if (!dispatchedBySessionPool) { if (session.isSessionAsyncDispatch()) { try { TaskRunner taskRunner = this.taskRunner; if (taskRunner == null) { synchronized (this) { if (this.taskRunner == null) { if (!isRunning()) { // stop has been called return; } this.taskRunner = session.connection.getSessionTaskRunner().createTaskRunner(this, "ActiveMQ Session: " + session.getSessionId()); } taskRunner = this.taskRunner; } } taskRunner.wakeup(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } } else { while (iterate()) { } } } }
@Override public void run() { try { Topic.this.taskRunner.wakeup(); } catch (InterruptedException e) { } } };
@Override public void run() { try { Topic.this.taskRunner.wakeup(); } catch (InterruptedException e) { } } };
private void asyncWakeup() { try { pendingWakeups.incrementAndGet(); this.taskRunner.wakeup(); } catch (InterruptedException e) { LOG.warn("Async task runner failed to wakeup ", e); } }
public void reconnect() { LOG.debug("Waking up reconnect task"); try { reconnectTask.wakeup(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } }
public void reconnect() { LOG.debug("Waking up reconnect task"); try { reconnectTask.wakeup(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } }
public void onUsageChanged(Usage usage, int oldPercentUsage, int newPercentUsage) { // Do we need to start evicting cache entries? Usage > than the // high mark if (oldPercentUsage < newPercentUsage && usage.getPercentUsage() >= usageHighMark) { try { evictionTask.wakeup(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } } }
protected void wakeup() { if (async && started.get()) { try { getTaskRunner().wakeup(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } catch (TransportDisposedIOException e) { } } }
public void onUsageChanged(Usage usage, int oldPercentUsage, int newPercentUsage) { // Do we need to start evicting cache entries? Usage > than the // high mark if (oldPercentUsage < newPercentUsage && usage.getPercentUsage() >= usageHighMark) { try { evictionTask.wakeup(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } } }