public void stop() throws Exception { scheduler.cancel(gcTask); }
public synchronized void executePeriodically(final Runnable task, long period) { TimerTask existing = timerTasks.get(task); if (existing != null) { LOG.debug("Task {} already scheduled, cancelling and rescheduling", task); cancel(task); } TimerTask timerTask = new SchedulerTimerTask(task); timer.schedule(timerTask, period, period); timerTasks.put(task, timerTask); }
@Override public void stop() throws Exception { started = false; this.scheduler.cancel(purgeInactiveDestinationsTask); ServiceStopper ss = new ServiceStopper(); doStop(ss); ss.throwFirstException(); // clear the state clientIdSet.clear(); connections.clear(); destinations.clear(); brokerInfos.clear(); }
public void stop() { if (!brokerService.isUseJmx()) { return; } scheduler.cancel(purgeInactiveDestinationViewTask); for (NetworkDestinationContainer networkDestinationContainer : inboundDestinationViewMap.values()) { try { brokerService.getManagementContext().unregisterMBean(networkDestinationContainer.objectName); } catch (Exception e) { LOG.error("Network bridge could not be unregistered in JMX: {}", e.getMessage(), e); } } for (NetworkDestinationContainer networkDestinationContainer : outboundDestinationViewMap.values()) { try { brokerService.getManagementContext().unregisterMBean(networkDestinationContainer.objectName); } catch (Exception e) { LOG.debug("Network bridge could not be unregistered in JMX: {}", e.getMessage(), e); } } inboundDestinationViewMap.clear(); outboundDestinationViewMap.clear(); }
@Override public void stop() throws Exception { if (started.compareAndSet(true, false)) { if (taskRunner != null) { taskRunner.shutdown(); } this.subscriptionRecoveryPolicy.stop(); if (memoryUsage != null) { memoryUsage.stop(); } if (this.topicStore != null) { this.topicStore.stop(); } scheduler.cancel(expireMessagesTask); } }
this.session.connection.getScheduler().cancel(optimizedAckTask); } catch (JMSException e) { LOG.debug("Caught exception while cancelling old optimized ack task", e);
@Override public void stop() throws Exception { this.usageManager.getMemoryUsage().removeUsageListener(this); if (!started.compareAndSet(true, false)) { return; } this.scheduler.cancel(periodicCheckpointTask); this.scheduler.stop(); // Take one final checkpoint and stop checkpoint processing. checkpoint(true, true); checkpointTask.shutdown(); ThreadPoolUtils.shutdown(checkpointExecutor); checkpointExecutor = null; queues.clear(); topics.clear(); IOException firstException = null; try { journal.close(); } catch (Exception e) { firstException = IOExceptionSupport.create("Failed to close journals: " + e, e); } longTermPersistence.stop(); if (firstException != null) { throw firstException; } }
this.session.connection.getScheduler().cancel(optimizedAckTask); optimizedAckTask = null;
scheduler.cancel(expireMessagesTask);
public void stop() throws Exception { scheduler.cancel(gcTask); }
public void stop() throws Exception { scheduler.cancel(gcTask); }
public synchronized void executePeriodically(final Runnable task, long period) { TimerTask existing = timerTasks.get(task); if (existing != null) { LOG.debug("Task {} already scheduled, cancelling and rescheduling", task); cancel(task); } TimerTask timerTask = new SchedulerTimerTask(task); timer.schedule(timerTask, period, period); timerTasks.put(task, timerTask); }
public synchronized void executePeriodically(final Runnable task, long period) { TimerTask existing = timerTasks.get(task); if (existing != null) { LOG.debug("Task {} already scheduled, cancelling and rescheduling", task); cancel(task); } TimerTask timerTask = new SchedulerTimerTask(task); timer.schedule(timerTask, period, period); timerTasks.put(task, timerTask); }
public synchronized void executePeriodically(final Runnable task, long period) { TimerTask existing = timerTasks.get(task); if (existing != null) { LOG.debug("Task {} already scheduled, cancelling and rescheduling", task); cancel(task); } TimerTask timerTask = new SchedulerTimerTask(task); timer.schedule(timerTask, period, period); timerTasks.put(task, timerTask); }
@Override public void stop() throws Exception { started = false; this.scheduler.cancel(purgeInactiveDestinationsTask); ServiceStopper ss = new ServiceStopper(); doStop(ss); ss.throwFirstException(); // clear the state clientIdSet.clear(); connections.clear(); destinations.clear(); brokerInfos.clear(); }
@Override public void stop() throws Exception { started = false; this.scheduler.cancel(purgeInactiveDestinationsTask); ServiceStopper ss = new ServiceStopper(); doStop(ss); ss.throwFirstException(); // clear the state clientIdSet.clear(); connections.clear(); destinations.clear(); brokerInfos.clear(); }
@Override public void stop() throws Exception { started = false; this.scheduler.cancel(purgeInactiveDestinationsTask); ServiceStopper ss = new ServiceStopper(); doStop(ss); ss.throwFirstException(); // clear the state clientIdSet.clear(); connections.clear(); destinations.clear(); brokerInfos.clear(); }
@Override public void stop() throws Exception { started = false; this.scheduler.cancel(purgeInactiveDestinationsTask); ServiceStopper ss = new ServiceStopper(); doStop(ss); ss.throwFirstException(); // clear the state clientIdSet.clear(); connections.clear(); destinations.clear(); brokerInfos.clear(); }
@Override public void stop() throws Exception { if (monitorTask != null) { try { this.getBrokerService().getScheduler().cancel(monitorTask); } catch (Exception letsNotStopStop) { LOG.warn("Failed to cancel config monitor task", letsNotStopStop); } } unregisterMbean(); super.stop(); }
@Override public void stop() throws Exception { if (started.compareAndSet(true, false)) { if (taskRunner != null) { taskRunner.shutdown(); } this.subscriptionRecoveryPolicy.stop(); if (memoryUsage != null) { memoryUsage.stop(); } if (this.topicStore != null) { this.topicStore.stop(); } scheduler.cancel(expireMessagesTask); } }