public void start() throws Exception { scheduler.executePeriodically(gcTask, GC_INTERVAL); }
@Override public void slowConsumer(ConnectionContext context, Subscription subs) { if (maxSlowCount < 0 && maxSlowDuration < 0) { // nothing to do LOG.info("no limits set, slowConsumer strategy has nothing to do"); return; } if (taskStarted.compareAndSet(false, true)) { scheduler.executePeriodically(this, checkPeriod); } if (!slowConsumers.containsKey(subs)) { slowConsumers.put(subs, new SlowConsumerEntry(context)); } else if (maxSlowCount > 0) { slowConsumers.get(subs).slow(); } }
@Override public void setBrokerService(Broker broker) { super.setBrokerService(broker); // Task starts right away since we may not receive any slow consumer events. if (taskStarted.compareAndSet(false, true)) { scheduler.executePeriodically(this, getCheckPeriod()); } }
public void start() { if (networkBridgeConfiguration.isGcDestinationViews()) { long period = networkBridgeConfiguration.getGcSweepTime(); if (period > 0) { scheduler.executePeriodically(purgeInactiveDestinationViewTask, period); } } }
/** * Schedules a periodic task based on schedulePeriodForDiskLimitCheck to * update store and temporary store limits if the amount of available space * plus current store size is less than the existin configured limit */ protected void scheduleDiskUsageLimitsCheck() throws IOException { if (schedulePeriodForDiskUsageCheck > 0 && (getPersistenceAdapter() != null || getTmpDataDirectory() != null)) { Runnable diskLimitCheckTask = new Runnable() { @Override public void run() { try { checkStoreUsageLimits(); } catch (Throwable e) { LOG.error("Failed to check persistent disk usage limits", e); } try { checkTmpStoreUsageLimits(); } catch (Throwable e) { LOG.error("Failed to check temporary store usage limits", e); } } }; scheduler.executePeriodically(diskLimitCheckTask, schedulePeriodForDiskUsageCheck); } }
this.session.connection.getScheduler().executePeriodically(optimizedAckTask, optimizedAckScheduledAckInterval); } catch (JMSException e) { LOG.debug("Caught exception while scheduling new optimized ack task", e);
@Override public void start() throws Exception { if (started.compareAndSet(false, true)) { this.subscriptionRecoveryPolicy.start(); if (memoryUsage != null) { memoryUsage.start(); } if (getExpireMessagesPeriod() > 0 && !AdvisorySupport.isAdvisoryTopic(getActiveMQDestination())) { scheduler.executePeriodically(expireMessagesTask, getExpireMessagesPeriod()); } } }
@Override public void start() throws Exception { started = true; queueRegion.start(); topicRegion.start(); tempQueueRegion.start(); tempTopicRegion.start(); int period = this.brokerService.getSchedulePeriodForDestinationPurge(); if (period > 0) { this.scheduler.executePeriodically(purgeInactiveDestinationsTask, period); } }
this.scheduler.executePeriodically(periodicCheckpointTask, checkpointInterval / 10);
@Override public void start() throws Exception { if (started.compareAndSet(false, true)) { if (memoryUsage != null) { memoryUsage.start(); } if (systemUsage.getStoreUsage() != null) { systemUsage.getStoreUsage().start(); } if (systemUsage.getTempUsage() != null) { systemUsage.getTempUsage().start(); } systemUsage.getMemoryUsage().addUsageListener(this); messages.start(); if (getExpireMessagesPeriod() > 0) { scheduler.executePeriodically(expireMessagesTask, getExpireMessagesPeriod()); } doPageIn(false); } }
scheduler.start(); scheduler.executePeriodically(this, cleanupInterval);
@Override public void setBrokerService(Broker broker) { super.setBrokerService(broker); // Task starts right away since we may not receive any slow consumer events. if (taskStarted.compareAndSet(false, true)) { scheduler.executePeriodically(this, getCheckPeriod()); } }
public void start() { if (networkBridgeConfiguration.isGcDestinationViews()) { long period = networkBridgeConfiguration.getGcSweepTime(); if (period > 0) { scheduler.executePeriodically(purgeInactiveDestinationViewTask, period); } } }
public void start() { if (networkBridgeConfiguration.isGcDestinationViews()) { long period = networkBridgeConfiguration.getGcSweepTime(); if (period > 0) { scheduler.executePeriodically(purgeInactiveDestinationViewTask, period); } } }
@Override public void start() throws Exception { if (started.compareAndSet(false, true)) { this.subscriptionRecoveryPolicy.start(); if (memoryUsage != null) { memoryUsage.start(); } if (getExpireMessagesPeriod() > 0 && !AdvisorySupport.isAdvisoryTopic(getActiveMQDestination())) { scheduler.executePeriodically(expireMessagesTask, getExpireMessagesPeriod()); } } }
@Override public void start() throws Exception { if (started.compareAndSet(false, true)) { this.subscriptionRecoveryPolicy.start(); if (memoryUsage != null) { memoryUsage.start(); } if (getExpireMessagesPeriod() > 0 && !AdvisorySupport.isAdvisoryTopic(getActiveMQDestination())) { scheduler.executePeriodically(expireMessagesTask, getExpireMessagesPeriod()); } } }
@Override public void start() throws Exception { if (started.compareAndSet(false, true)) { this.subscriptionRecoveryPolicy.start(); if (memoryUsage != null) { memoryUsage.start(); } if (getExpireMessagesPeriod() > 0 && !AdvisorySupport.isAdvisoryTopic(getActiveMQDestination())) { scheduler.executePeriodically(expireMessagesTask, getExpireMessagesPeriod()); } } }
@Override public void start() throws Exception { started = true; queueRegion.start(); topicRegion.start(); tempQueueRegion.start(); tempTopicRegion.start(); int period = this.brokerService.getSchedulePeriodForDestinationPurge(); if (period > 0) { this.scheduler.executePeriodically(purgeInactiveDestinationsTask, period); } }
@Override public void start() throws Exception { started = true; queueRegion.start(); topicRegion.start(); tempQueueRegion.start(); tempTopicRegion.start(); int period = this.brokerService.getSchedulePeriodForDestinationPurge(); if (period > 0) { this.scheduler.executePeriodically(purgeInactiveDestinationsTask, period); } }
@Override public void start() throws Exception { started = true; queueRegion.start(); topicRegion.start(); tempQueueRegion.start(); tempTopicRegion.start(); int period = this.brokerService.getSchedulePeriodForDestinationPurge(); if (period > 0) { this.scheduler.executePeriodically(purgeInactiveDestinationsTask, period); } }