public class AggregatorManager extends Object implements org.mule.runtime.api.lifecycle.Lifecycle
| Constructor and Description |
|---|
AggregatorManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose() |
Map<String,Runnable> |
getAvailableAggregators() |
org.mule.runtime.api.cluster.ClusterService |
getClusterService() |
org.mule.runtime.api.component.ConfigurationProperties |
getConfigProperties() |
AtomicBoolean |
getContextStarted() |
org.mule.runtime.core.api.context.notification.MuleContextNotificationListener<org.mule.runtime.core.api.context.notification.MuleContextNotification> |
getContextStartListener() |
Optional<AggregatorListener> |
getListener(String aggregatorName)
Get the listener registered to the aggregator with
If the aggregator does not have any listener registered to it an
Optional.empty() will be returned |
org.mule.runtime.core.api.lifecycle.PrimaryNodeLifecycleNotificationListener |
getNotificationListener() |
org.mule.runtime.api.notification.NotificationListenerRegistry |
getNotificationListenerRegistry() |
Object |
getRegisteredAggregatorsModificationLock() |
Map<String,AggregatorListener> |
getRegisteredListeners() |
org.mule.runtime.api.scheduler.Scheduler |
getScheduler() |
org.mule.runtime.api.scheduler.SchedulerService |
getSchedulerService() |
long |
getTaskSchedulingPeriod() |
long |
getTaskSchedulingPeriodInMillis()
Returns the period used for scheduling registered aggregator tasks in milliseconds.
|
void |
initialise() |
boolean |
isInitialized() |
boolean |
isStarted() |
void |
onContextStarted() |
void |
registerAggregator(String aggregatorName,
Runnable synchronizingTask)
Registers a new aggregator to keep track of the available ones and check valid listener registrations.
|
void |
registerListener(String aggregatorName,
AggregatorListener listener)
Registers a unique listener to an already registered aggregator
|
void |
setAvailableAggregators(Map<String,Runnable> availableAggregators) |
void |
setClusterService(org.mule.runtime.api.cluster.ClusterService clusterService) |
void |
setConfigProperties(org.mule.runtime.api.component.ConfigurationProperties configProperties) |
void |
setContextStartListener(org.mule.runtime.core.api.context.notification.MuleContextNotificationListener<org.mule.runtime.core.api.context.notification.MuleContextNotification> contextStartListener) |
void |
setInitialized(boolean initialized) |
void |
setNotificationListener(org.mule.runtime.core.api.lifecycle.PrimaryNodeLifecycleNotificationListener notificationListener) |
void |
setNotificationListenerRegistry(org.mule.runtime.api.notification.NotificationListenerRegistry notificationListenerRegistry) |
void |
setRegisteredListeners(Map<String,AggregatorListener> registeredListeners) |
void |
setScheduler(org.mule.runtime.api.scheduler.Scheduler scheduler) |
void |
setSchedulerService(org.mule.runtime.api.scheduler.SchedulerService schedulerService) |
void |
setStarted(boolean started) |
void |
setTaskSchedulingPeriod(long taskSchedulingPeriod) |
void |
start() |
void |
stop() |
void |
unregisterListener(String aggregatorName,
AggregatorListener listener)
Unregisters a listener from an already registered aggregator
|
public Map<String,AggregatorListener> getRegisteredListeners()
public void setRegisteredListeners(Map<String,AggregatorListener> registeredListeners)
public void setAvailableAggregators(Map<String,Runnable> availableAggregators)
public Object getRegisteredAggregatorsModificationLock()
public boolean isInitialized()
public void setInitialized(boolean initialized)
public boolean isStarted()
public void setStarted(boolean started)
public AtomicBoolean getContextStarted()
public long getTaskSchedulingPeriod()
public void setTaskSchedulingPeriod(long taskSchedulingPeriod)
public org.mule.runtime.core.api.lifecycle.PrimaryNodeLifecycleNotificationListener getNotificationListener()
public void setNotificationListener(org.mule.runtime.core.api.lifecycle.PrimaryNodeLifecycleNotificationListener notificationListener)
public org.mule.runtime.core.api.context.notification.MuleContextNotificationListener<org.mule.runtime.core.api.context.notification.MuleContextNotification> getContextStartListener()
public void setContextStartListener(org.mule.runtime.core.api.context.notification.MuleContextNotificationListener<org.mule.runtime.core.api.context.notification.MuleContextNotification> contextStartListener)
public org.mule.runtime.api.scheduler.Scheduler getScheduler()
public void setScheduler(org.mule.runtime.api.scheduler.Scheduler scheduler)
public org.mule.runtime.api.scheduler.SchedulerService getSchedulerService()
public void setSchedulerService(org.mule.runtime.api.scheduler.SchedulerService schedulerService)
public org.mule.runtime.api.notification.NotificationListenerRegistry getNotificationListenerRegistry()
public void setNotificationListenerRegistry(org.mule.runtime.api.notification.NotificationListenerRegistry notificationListenerRegistry)
public org.mule.runtime.api.cluster.ClusterService getClusterService()
public void setClusterService(org.mule.runtime.api.cluster.ClusterService clusterService)
public org.mule.runtime.api.component.ConfigurationProperties getConfigProperties()
public void setConfigProperties(org.mule.runtime.api.component.ConfigurationProperties configProperties)
public void initialise()
throws org.mule.runtime.api.lifecycle.InitialisationException
initialise in interface org.mule.runtime.api.lifecycle.Initialisableorg.mule.runtime.api.lifecycle.InitialisationExceptionpublic void onContextStarted()
public void start()
throws org.mule.runtime.api.exception.MuleException
start in interface org.mule.runtime.api.lifecycle.Startableorg.mule.runtime.api.exception.MuleExceptionpublic void stop()
throws org.mule.runtime.api.exception.MuleException
stop in interface org.mule.runtime.api.lifecycle.Stoppableorg.mule.runtime.api.exception.MuleExceptionpublic void dispose()
dispose in interface org.mule.runtime.api.lifecycle.Disposablepublic void registerAggregator(String aggregatorName, Runnable synchronizingTask)
aggregatorName - the name of the aggregator registeredpublic void registerListener(String aggregatorName, AggregatorListener listener) throws org.mule.runtime.api.exception.MuleRuntimeException
aggregatorName - the name of the aggregator to register tolistener - the listener to be called when neededorg.mule.runtime.api.exception.MuleRuntimeExceptionpublic void unregisterListener(String aggregatorName, AggregatorListener listener) throws org.mule.runtime.api.exception.MuleRuntimeException
aggregatorName - the name of the aggregator to unregister fromlistener - the listener to be called when neededorg.mule.runtime.api.exception.MuleRuntimeExceptionpublic Optional<AggregatorListener> getListener(String aggregatorName)
Optional.empty() will be returnedpublic long getTaskSchedulingPeriodInMillis()
Copyright © 2024 MuleSoft, Inc.. All rights reserved.