public class SwitchingClusterQueueManager extends Object implements org.mule.runtime.core.api.util.queue.QueueManager, org.mule.runtime.api.lifecycle.Lifecycle
QueueManager that wraps a ClusterQueueManager but accounts for the possibility of the
MuleConfiguration object disabling distributed queues. In which case, we fallback to the local queue manager.
The actual QueueManager to be used is resolved in the initialise() phase, after which this instance
becomes immutable.
| Constructor and Description |
|---|
SwitchingClusterQueueManager(ClusterQueueManager clusterQueueManager,
ClusterStoreProfile defaultClusterStoreProfile) |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose() |
Optional<org.mule.runtime.core.api.util.queue.QueueConfiguration> |
getQueueConfiguration(String queueName) |
org.mule.runtime.core.api.util.queue.QueueSession |
getQueueSession() |
void |
initialise() |
void |
setDefaultQueueConfiguration(org.mule.runtime.core.api.util.queue.QueueConfiguration config) |
void |
setQueueConfiguration(String queueName,
org.mule.runtime.core.api.util.queue.QueueConfiguration config) |
void |
start() |
void |
stop() |
public SwitchingClusterQueueManager(ClusterQueueManager clusterQueueManager, ClusterStoreProfile defaultClusterStoreProfile)
public void initialise()
throws org.mule.runtime.api.lifecycle.InitialisationException
initialise in interface org.mule.runtime.api.lifecycle.Initialisableorg.mule.runtime.api.lifecycle.InitialisationExceptionpublic org.mule.runtime.core.api.util.queue.QueueSession getQueueSession()
getQueueSession in interface org.mule.runtime.core.api.util.queue.QueueManagerpublic void setDefaultQueueConfiguration(org.mule.runtime.core.api.util.queue.QueueConfiguration config)
setDefaultQueueConfiguration in interface org.mule.runtime.core.api.util.queue.QueueManagerpublic void setQueueConfiguration(String queueName, org.mule.runtime.core.api.util.queue.QueueConfiguration config)
setQueueConfiguration in interface org.mule.runtime.core.api.util.queue.QueueManagerpublic Optional<org.mule.runtime.core.api.util.queue.QueueConfiguration> getQueueConfiguration(String queueName)
getQueueConfiguration in interface org.mule.runtime.core.api.util.queue.QueueManagerpublic 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.DisposableCopyright © 2006–2022 MuleSoft, Inc.. All rights reserved.