public class BrokerService extends Object implements org.apache.activemq.Service
Modifier and Type | Field and Description |
---|---|
static String |
BROKER_VERSION |
static String |
DEFAULT_BROKER_NAME |
static int |
DEFAULT_MAX_FILE_LENGTH |
static String |
DEFAULT_PORT |
static long |
DEFAULT_START_TIMEOUT |
protected DestinationFactory |
destinationFactory |
static String |
LOCAL_HOST_NAME |
Constructor and Description |
---|
BrokerService() |
Modifier and Type | Method and Description |
---|---|
TransportConnector |
addConnector(String bindAddress)
Adds a new transport connector for the given bind address
|
TransportConnector |
addConnector(TransportConnector connector)
Adds a new transport connector
|
TransportConnector |
addConnector(org.apache.activemq.transport.TransportServer transport)
Adds a new transport connector for the given TransportServer transport
|
TransportConnector |
addConnector(URI bindAddress)
Adds a new transport connector for the given bind address
|
protected Broker |
addInterceptors(Broker broker)
Strategy method to add interceptors to the broker
|
JmsConnector |
addJmsConnector(JmsConnector connector) |
NetworkConnector |
addNetworkConnector(NetworkConnector connector)
Adds a new network connector to connect this broker to a federated
network
|
NetworkConnector |
addNetworkConnector(String discoveryAddress)
Adds a new network connector using the given discovery address
|
NetworkConnector |
addNetworkConnector(URI discoveryAddress)
Adds a new network connector using the given discovery address
|
void |
addPreShutdownHook(Runnable hook)
Adds a
Runnable hook that will be invoked before the
broker is stopped. |
ProxyConnector |
addProxyConnector(ProxyConnector connector) |
ProxyConnector |
addProxyConnector(String bindAddress)
Adds a new proxy connector using the given bind address
|
ProxyConnector |
addProxyConnector(URI bindAddress)
Adds a new proxy connector using the given bind address
|
void |
addService(org.apache.activemq.Service service)
Adds a new service so that it will be started as part of the broker
lifecycle
|
protected void |
addShutdownHook() |
void |
addShutdownHook(Runnable hook) |
void |
autoStart() |
protected void |
checkMemorySystemUsageLimits() |
boolean |
checkQueueSize(String queueName) |
protected void |
checkStoreSystemUsageLimits() |
protected void |
checkStoreUsageLimits()
Check that the store usage limit is not greater than max usable
space and adjust if it is
|
protected void |
checkTmpStoreUsageLimits()
Check that temporary usage limit is not greater than max usable
space and adjust if it is
|
protected void |
checkUsageLimit(File dir,
PercentLimitUsage<?> storeUsage,
int percentLimit) |
protected void |
configureService(Object service)
Perform any custom dependency injection
|
protected void |
configureServices(Object[] services)
Perform any custom dependency injection
|
protected void |
containerShutdown()
Causes a clean shutdown of the container when the VM is being shut down
|
protected Broker |
createBroker()
Factory method to create a new broker
|
protected ObjectName |
createBrokerObjectName() |
protected DestinationInterceptor[] |
createDefaultDestinationInterceptor()
Create the default destination interceptor
|
ObjectName |
createDuplexNetworkConnectorObjectName(String transport) |
ObjectName |
createNetworkConnectorObjectName(NetworkConnector connector) |
protected PersistenceAdapter |
createPersistenceAdapter() |
protected Broker |
createRegionBroker()
Factory method to create the core region broker onto which interceptors
are added
|
protected Broker |
createRegionBroker(DestinationInterceptor destinationInterceptor) |
protected TransportConnector |
createTransportConnector(URI brokerURI) |
void |
decrementCurrentConnections() |
void |
deleteAllMessages()
Delete all messages from the persistent store
|
ConnectionContext |
getAdminConnectionContext()
Returns the broker's administration connection context used for
configuring the broker at startup
|
BrokerView |
getAdminView()
Returns the administration view of the broker; used to create and destroy
resources such as queues and topics.
|
Broker |
getBroker()
Returns the message broker
|
BrokerContext |
getBrokerContext() |
File |
getBrokerDataDirectory() |
String |
getBrokerName() |
ObjectName |
getBrokerObjectName() |
TransportConnector |
getConnectorByName(String connectorName) |
SystemUsage |
getConsumerSystemUsage() |
int |
getConsumerSystemUsagePortion() |
int |
getCurrentConnections() |
File |
getDataDirectoryFile() |
String |
getDefaultSocketURIString() |
Destination |
getDestination(org.apache.activemq.command.ActiveMQDestination destination)
Looks up and lazily creates if necessary the destination for the given
JMS name
|
DestinationInterceptor[] |
getDestinationInterceptors() |
PolicyMap |
getDestinationPolicy() |
org.apache.activemq.command.ActiveMQDestination[] |
getDestinations() |
int |
getDiskUsageCheckRegrowThreshold() |
protected ThreadPoolExecutor |
getExecutor() |
IOExceptionHandler |
getIoExceptionHandler() |
JmsConnector[] |
getJmsBridgeConnectors() |
JobSchedulerStore |
getJobSchedulerStore() |
ManagementContext |
getManagementContext() |
int |
getMaxPurgedDestinationsPerSweep() |
long |
getMbeanInvocationTimeout()
Gets the time in Milliseconds that an invocation of an MBean method will wait before
failing.
|
MessageAuthorizationPolicy |
getMessageAuthorizationPolicy() |
NetworkConnector |
getNetworkConnectorByName(String connectorName) |
List<NetworkConnector> |
getNetworkConnectors() |
String[] |
getNetworkConnectorURIs() |
long |
getOfflineDurableSubscriberTaskSchedule() |
long |
getOfflineDurableSubscriberTimeout() |
PersistenceAdapter |
getPersistenceAdapter() |
PersistenceAdapterFactory |
getPersistenceFactory() |
org.apache.activemq.thread.TaskRunnerFactory |
getPersistenceTaskRunnerFactory() |
int |
getPersistenceThreadPriority() |
BrokerPlugin[] |
getPlugins() |
protected Object |
getPort(Map<?,?> options)
Extracts the port from the options
|
ProducerBrokerExchange |
getProducerBrokerExchange(org.apache.activemq.command.ProducerInfo producerInfo) |
SystemUsage |
getProducerSystemUsage() |
int |
getProducerSystemUsagePortion() |
List<ProxyConnector> |
getProxyConnectors() |
Broker |
getRegionBroker() |
int |
getSchedulePeriodForDestinationPurge() |
org.apache.activemq.thread.Scheduler |
getScheduler() |
File |
getSchedulerDirectoryFile() |
org.apache.activemq.Service[] |
getServices() |
org.apache.activemq.broker.SslContext |
getSslContext() |
Throwable |
getStartException() |
int |
getStoreOpenWireVersion() |
int |
getSystemExitOnShutdownExitCode() |
SystemUsage |
getSystemUsage() |
org.apache.activemq.thread.TaskRunnerFactory |
getTaskRunnerFactory() |
int |
getTaskRunnerPriority() |
PListStore |
getTempDataStore() |
int |
getTimeBeforePurgeTempDestinations() |
File |
getTmpDataDirectory() |
long |
getTotalConnections() |
TransportConnector |
getTransportConnectorByName(String name) |
TransportConnector |
getTransportConnectorByScheme(String scheme) |
List<TransportConnector> |
getTransportConnectors() |
String[] |
getTransportConnectorURIs() |
Map<String,String> |
getTransportConnectorURIsAsMap() |
String |
getUptime() |
long |
getUptimeMillis() |
URI |
getVmConnectorURI() |
long |
getWaitForSlaveTimeout() |
void |
handleIOException(IOException exception) |
void |
incrementCurrentConnections() |
void |
incrementTotalConnections() |
boolean |
isAdjustUsageLimits() |
boolean |
isAdvisorySupport() |
boolean |
isAllowTempAutoCreationOnSend() |
boolean |
isCacheTempDestinations() |
boolean |
isDedicatedTaskRunner() |
boolean |
isDeleteAllMessagesOnStartup() |
boolean |
isEnableStatistics() |
boolean |
isKeepDurableSubsActive() |
boolean |
isMonitorConnectionSplits() |
boolean |
isNetworkConnectorStartAsync() |
boolean |
isPassiveSlave()
Get the passiveSlave
|
boolean |
isPersistent() |
boolean |
isPopulateJMSXUserID() |
boolean |
isPopulateUserNameInMBeans()
Should MBeans that support showing the Authenticated User Name information have this
value filled in or not.
|
boolean |
isRejectDurableConsumers() |
boolean |
isRestartAllowed() |
boolean |
isRestartRequested()
A lifecycle manager of the BrokerService should
inspect this property after a broker shutdown has occurred
to find out if the broker needs to be re-created and started
again.
|
boolean |
isRollbackOnlyOnAsyncException() |
boolean |
isSchedulerSupport() |
boolean |
isShutdownOnMasterFailure() |
boolean |
isShutdownOnSlaveFailure() |
boolean |
isSlave() |
boolean |
isSplitSystemUsageForProducersConsumers() |
boolean |
isStartAsync() |
boolean |
isStarted() |
boolean |
isStopped() |
boolean |
isStopping() |
boolean |
isSystemExitOnShutdown() |
boolean |
isUseAuthenticatedPrincipalForJMSXUserID() |
boolean |
isUseJmx() |
boolean |
isUseLocalHostBrokerName() |
boolean |
isUseLoggingForShutdownErrors() |
boolean |
isUseMirroredQueues() |
boolean |
isUseShutdownHook() |
boolean |
isUseTempMirroredQueues() |
boolean |
isUseVirtualDestSubs() |
boolean |
isUseVirtualDestSubsOnCreation() |
boolean |
isUseVirtualTopics() |
boolean |
isWaitForSlave() |
protected void |
logError(String message,
Throwable e) |
void |
masterFailed() |
protected void |
processHelperProperties()
Handles any lazy-creation helper properties which are added to make
things easier to configure inside environments such as Spring
|
protected TransportConnector |
registerConnectorMBean(TransportConnector connector) |
protected void |
registerJmsConnectorMBean(JmsConnector connector) |
void |
registerNetworkConnectorMBean(NetworkConnector connector) |
protected PersistenceAdapter |
registerPersistenceAdapterMBean(PersistenceAdapter adaptor) |
protected void |
registerProxyConnectorMBean(ProxyConnector connector) |
boolean |
removeConnector(TransportConnector connector)
Stops and removes a transport connector from the broker.
|
void |
removeDestination(org.apache.activemq.command.ActiveMQDestination destination) |
JmsConnector |
removeJmsConnector(JmsConnector connector) |
boolean |
removeNetworkConnector(NetworkConnector connector)
Removes the given network connector without stopping it.
|
void |
removePreShutdownHook(Runnable hook) |
void |
removeService(org.apache.activemq.Service service) |
protected void |
removeShutdownHook() |
void |
removeShutdownHook(Runnable hook) |
void |
requestRestart() |
protected void |
scheduleDiskUsageLimitsCheck()
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
|
void |
setAdjustUsageLimits(boolean adjustUsageLimits) |
void |
setAdminView(BrokerView adminView) |
void |
setAdvisorySupport(boolean advisorySupport)
Allows the support of advisory messages to be disabled for performance
reasons.
|
void |
setAllowTempAutoCreationOnSend(boolean allowTempAutoCreationOnSend)
enable if temp destinations need to be propagated through a network when
advisorySupport==false.
|
void |
setBrokerContext(BrokerContext brokerContext) |
void |
setBrokerId(String brokerId) |
void |
setBrokerName(String brokerName) |
void |
setBrokerObjectName(ObjectName brokerObjectName)
Sets the JMX ObjectName for this broker
|
void |
setCacheTempDestinations(boolean cacheTempDestinations) |
void |
setConsumerSystemUsage(SystemUsage consumerSystemUsage) |
void |
setConsumerSystemUsagePortion(int consumerSystemUsagePortion) |
void |
setDataDirectory(String dataDirectory)
Sets the directory in which the data files will be stored by default for
the JDBC and Journal persistence adaptors.
|
void |
setDataDirectoryFile(File dataDirectoryFile)
Sets the directory in which the data files will be stored by default for
the JDBC and Journal persistence adaptors.
|
void |
setDedicatedTaskRunner(boolean dedicatedTaskRunner) |
void |
setDeleteAllMessagesOnStartup(boolean deletePersistentMessagesOnStartup)
Sets whether or not all messages are deleted on startup - mostly only
useful for testing.
|
void |
setDestinationFactory(DestinationFactory destinationFactory) |
void |
setDestinationInterceptors(DestinationInterceptor[] destinationInterceptors)
Sets the destination interceptors to use
|
void |
setDestinationPolicy(PolicyMap policyMap)
Sets the destination specific policies available either for exact
destinations or for wildcard areas of destinations.
|
void |
setDestinations(org.apache.activemq.command.ActiveMQDestination[] destinations)
Sets the destinations which should be loaded/created on startup
|
void |
setDiskUsageCheckRegrowThreshold(int diskUsageCheckRegrowThreshold) |
void |
setEnableStatistics(boolean enableStatistics)
Sets whether or not the Broker's services enable statistics or not.
|
void |
setIoExceptionHandler(IOExceptionHandler ioExceptionHandler)
override the Default IOException handler, called when persistence adapter
has experiences File or JDBC I/O Exceptions
|
void |
setJmsBridgeConnectors(JmsConnector[] jmsConnectors) |
void |
setJobSchedulerStore(JobSchedulerStore jobSchedulerStore) |
void |
setKeepDurableSubsActive(boolean keepDurableSubsActive) |
void |
setManagementContext(ManagementContext managementContext) |
void |
setMaxPurgedDestinationsPerSweep(int maxPurgedDestinationsPerSweep) |
void |
setMbeanInvocationTimeout(long mbeanInvocationTimeout)
Gets the time in Milliseconds that an invocation of an MBean method will wait before
failing.
|
void |
setMessageAuthorizationPolicy(MessageAuthorizationPolicy messageAuthorizationPolicy)
Sets the policy used to decide if the current connection is authorized to
consume a given message
|
void |
setMonitorConnectionSplits(boolean monitorConnectionSplits) |
void |
setNetworkConnectors(List<?> networkConnectors)
Sets the network connectors which this broker will use to connect to
other brokers in a federated network
|
void |
setNetworkConnectorStartAsync(boolean networkConnectorStartAsync) |
void |
setNetworkConnectorURIs(String[] networkConnectorURIs) |
void |
setOfflineDurableSubscriberTaskSchedule(long offlineDurableSubscriberTaskSchedule) |
void |
setOfflineDurableSubscriberTimeout(long offlineDurableSubscriberTimeout) |
void |
setPassiveSlave(boolean passiveSlave)
Set the passiveSlave
|
void |
setPersistenceAdapter(PersistenceAdapter persistenceAdapter)
Sets the persistence adaptor implementation to use for this broker
|
void |
setPersistenceFactory(PersistenceAdapterFactory persistenceFactory) |
void |
setPersistenceTaskRunnerFactory(org.apache.activemq.thread.TaskRunnerFactory persistenceTaskRunnerFactory) |
void |
setPersistenceThreadPriority(int persistenceThreadPriority) |
void |
setPersistent(boolean persistent)
Sets whether or not persistence is enabled or disabled.
|
void |
setPlugins(BrokerPlugin[] plugins)
Sets a number of broker plugins to install such as for security
authentication or authorization
|
void |
setPopulateJMSXUserID(boolean populateJMSXUserID)
Sets whether or not the broker should populate the JMSXUserID header.
|
void |
setPopulateUserNameInMBeans(boolean value)
Sets whether Authenticated User Name information is shown in MBeans that support this field.
|
void |
setProducerSystemUsage(SystemUsage producerUsageManager) |
void |
setProducerSystemUsagePortion(int producerSystemUsagePortion) |
void |
setProxyConnectors(List<?> proxyConnectors)
Sets the network connectors which this broker will use to connect to
other brokers in a federated network
|
void |
setRegionBroker(Broker regionBroker) |
void |
setRejectDurableConsumers(boolean rejectDurableConsumers) |
void |
setRestartAllowed(boolean restartAllowed)
Sets if the broker allowed to restart on shutdown.
|
void |
setRollbackOnlyOnAsyncException(boolean rollbackOnlyOnAsyncException) |
void |
setSchedulePeriodForDestinationPurge(int schedulePeriodForDestinationPurge) |
void |
setSchedulePeriodForDiskUsageCheck(int schedulePeriodForDiskUsageCheck) |
void |
setSchedulerDirectory(String schedulerDirectory) |
void |
setSchedulerDirectoryFile(File schedulerDirectory) |
void |
setSchedulerSupport(boolean schedulerSupport) |
void |
setServices(org.apache.activemq.Service[] services)
Sets the services associated with this broker.
|
void |
setShutdownHooks(List<Runnable> hooks)
Sets hooks to be executed when broker shut down
|
void |
setShutdownOnMasterFailure(boolean shutdownOnMasterFailure) |
void |
setShutdownOnSlaveFailure(boolean shutdownOnSlaveFailure) |
void |
setSplitSystemUsageForProducersConsumers(boolean splitSystemUsageForProducersConsumers) |
void |
setSslContext(org.apache.activemq.broker.SslContext sslContext) |
void |
setStartAsync(boolean startAsync) |
void |
setStoreOpenWireVersion(int storeOpenWireVersion) |
void |
setSystemExitOnShutdown(boolean systemExitOnShutdown) |
void |
setSystemExitOnShutdownExitCode(int systemExitOnShutdownExitCode) |
void |
setSystemUsage(SystemUsage memoryManager) |
void |
setTaskRunnerFactory(org.apache.activemq.thread.TaskRunnerFactory taskRunnerFactory) |
void |
setTaskRunnerPriority(int taskRunnerPriority) |
void |
setTempDataStore(PListStore tempDataStore) |
void |
setTimeBeforePurgeTempDestinations(int timeBeforePurgeTempDestinations) |
void |
setTmpDataDirectory(File tmpDataDirectory) |
void |
setTransportConnectors(List<TransportConnector> transportConnectors)
Sets the transport connectors which this broker will listen on for new
clients
|
void |
setTransportConnectorURIs(String[] transportConnectorURIs) |
void |
setUseAuthenticatedPrincipalForJMSXUserID(boolean useAuthenticatedPrincipalForJMSXUserID) |
void |
setUseJmx(boolean useJmx)
Sets whether or not the Broker's services should be exposed into JMX or
not.
|
void |
setUseLocalHostBrokerName(boolean useLocalHostBrokerName) |
void |
setUseLoggingForShutdownErrors(boolean useLoggingForShutdownErrors)
Sets whether or not we should use commons-logging when reporting errors
when shutting down the broker
|
void |
setUseMirroredQueues(boolean useMirroredQueues)
Sets whether or not Mirrored
Queues should be supported by default if they have not been
explicitly configured.
|
void |
setUseShutdownHook(boolean useShutdownHook)
Sets whether or not we should use a shutdown handler to close down the
broker cleanly if the JVM is terminated.
|
void |
setUseTempMirroredQueues(boolean useTempMirroredQueues) |
void |
setUseVirtualDestSubs(boolean useVirtualDestSubs) |
void |
setUseVirtualDestSubsOnCreation(boolean useVirtualDestSubsOnCreation) |
void |
setUseVirtualTopics(boolean useVirtualTopics)
Sets whether or not Virtual
Topics should be supported by default if they have not been
explicitly configured.
|
void |
setVmConnectorURI(URI vmConnectorURI) |
void |
setWaitForSlave(boolean waitForSlave) |
void |
setWaitForSlaveTimeout(long waitForSlaveTimeout) |
protected boolean |
shouldAutostart() |
boolean |
shouldRecordVirtualDestination(org.apache.activemq.command.ActiveMQDestination destination) |
void |
start() |
void |
start(boolean force)
Forces a start of the broker.
|
void |
startAllConnectors()
Start all transport and network connections, proxies and bridges
|
protected void |
startDestinations()
Starts any configured destinations on startup
|
protected void |
startManagementContext() |
void |
startNetworkConnector(NetworkConnector connector,
Set<org.apache.activemq.command.ActiveMQDestination> durableDestinations,
ThreadPoolExecutor networkConnectorStartExecutor) |
void |
startNetworkConnector(NetworkConnector connector,
ThreadPoolExecutor networkConnectorStartExecutor) |
TransportConnector |
startTransportConnector(TransportConnector connector) |
protected void |
startVirtualConsumerDestinations() |
void |
stop() |
void |
stopAllConnectors(org.apache.activemq.util.ServiceStopper stopper) |
void |
stopGracefully(String connectorName,
String queueName,
long timeout,
long pollInterval)
This method (both connectorName and queueName are using regex to match)
1.
|
String |
toString() |
protected void |
unregisterConnectorMBean(TransportConnector connector) |
protected void |
unregisterNetworkConnectorMBean(NetworkConnector connector) |
protected void |
unregisterPersistenceAdapterMBean(PersistenceAdapter adaptor) |
boolean |
waitUntilStarted()
A helper method to block the caller thread until the broker has fully started
|
boolean |
waitUntilStarted(long timeout)
A helper method to block the caller thread until the broker has fully started
|
void |
waitUntilStopped()
A helper method to block the caller thread until the broker has been
stopped
|
public static final String DEFAULT_PORT
public static final String LOCAL_HOST_NAME
public static final String BROKER_VERSION
public static final String DEFAULT_BROKER_NAME
public static final int DEFAULT_MAX_FILE_LENGTH
public static final long DEFAULT_START_TIMEOUT
protected DestinationFactory destinationFactory
public BrokerService()
public TransportConnector addConnector(String bindAddress) throws Exception
Exception
public TransportConnector addConnector(URI bindAddress) throws Exception
Exception
public TransportConnector addConnector(org.apache.activemq.transport.TransportServer transport) throws Exception
Exception
public TransportConnector addConnector(TransportConnector connector) throws Exception
Exception
public boolean removeConnector(TransportConnector connector) throws Exception
connector
- Exception
public NetworkConnector addNetworkConnector(String discoveryAddress) throws Exception
Exception
public ProxyConnector addProxyConnector(String bindAddress) throws Exception
Exception
public NetworkConnector addNetworkConnector(URI discoveryAddress) throws Exception
Exception
public ProxyConnector addProxyConnector(URI bindAddress) throws Exception
Exception
public NetworkConnector addNetworkConnector(NetworkConnector connector) throws Exception
Exception
public boolean removeNetworkConnector(NetworkConnector connector)
NetworkConnector.stop()
to close the connectorpublic ProxyConnector addProxyConnector(ProxyConnector connector) throws Exception
Exception
public JmsConnector addJmsConnector(JmsConnector connector) throws Exception
Exception
public final void addPreShutdownHook(Runnable hook)
Runnable
hook that will be invoked before the
broker is stopped. This allows performing cleanup actions
before the broker is stopped. The hook should not throw
exceptions or block.public JmsConnector removeJmsConnector(JmsConnector connector)
public void masterFailed()
public long getUptimeMillis()
public boolean isStarted()
public void start(boolean force) throws Exception
force
- - if true enforces a restart.Exception
protected boolean shouldAutostart()
public void start() throws Exception
start
in interface org.apache.activemq.Service
Exception
public void stop() throws Exception
stop
in interface org.apache.activemq.Service
Exception
public boolean checkQueueSize(String queueName)
public void stopGracefully(String connectorName, String queueName, long timeout, long pollInterval) throws Exception
connectorName
- queueName
- timeout
- pollInterval
- Exception
public void waitUntilStopped()
public boolean isStopped()
public boolean waitUntilStarted()
public boolean waitUntilStarted(long timeout)
timeout
- the amount of time to wait before giving up and returning false.public BrokerView getAdminView() throws Exception
Exception
public void setAdminView(BrokerView adminView)
public String getBrokerName()
public void setBrokerName(String brokerName)
public PersistenceAdapterFactory getPersistenceFactory()
public File getDataDirectoryFile()
public File getBrokerDataDirectory()
public void setDataDirectory(String dataDirectory)
dataDirectory
- the directory to store data filespublic void setDataDirectoryFile(File dataDirectoryFile)
dataDirectoryFile
- the directory to store data filespublic File getTmpDataDirectory()
public void setTmpDataDirectory(File tmpDataDirectory)
tmpDataDirectory
- the tmpDataDirectory to setpublic void setPersistenceFactory(PersistenceAdapterFactory persistenceFactory)
public void setDestinationFactory(DestinationFactory destinationFactory)
public boolean isPersistent()
public void setPersistent(boolean persistent)
public boolean isPopulateJMSXUserID()
public void setPopulateJMSXUserID(boolean populateJMSXUserID)
public SystemUsage getSystemUsage()
public void setSystemUsage(SystemUsage memoryManager)
public SystemUsage getConsumerSystemUsage() throws IOException
IOException
public void setConsumerSystemUsage(SystemUsage consumerSystemUsage)
consumerSystemUsage
- the storeSystemUsage to setpublic SystemUsage getProducerSystemUsage() throws IOException
IOException
public void setProducerSystemUsage(SystemUsage producerUsageManager)
producerUsageManager
- the producerUsageManager to setpublic PersistenceAdapter getPersistenceAdapter() throws IOException
IOException
public void setPersistenceAdapter(PersistenceAdapter persistenceAdapter) throws IOException
IOException
public org.apache.activemq.thread.TaskRunnerFactory getTaskRunnerFactory()
public void setTaskRunnerFactory(org.apache.activemq.thread.TaskRunnerFactory taskRunnerFactory)
public org.apache.activemq.thread.TaskRunnerFactory getPersistenceTaskRunnerFactory()
public void setPersistenceTaskRunnerFactory(org.apache.activemq.thread.TaskRunnerFactory persistenceTaskRunnerFactory)
public boolean isUseJmx()
public boolean isEnableStatistics()
public void setEnableStatistics(boolean enableStatistics)
public void setUseJmx(boolean useJmx)
public ObjectName getBrokerObjectName() throws MalformedObjectNameException
MalformedObjectNameException
public void setBrokerObjectName(ObjectName brokerObjectName)
public ManagementContext getManagementContext()
public void setManagementContext(ManagementContext managementContext)
public NetworkConnector getNetworkConnectorByName(String connectorName)
public String[] getNetworkConnectorURIs()
public void setNetworkConnectorURIs(String[] networkConnectorURIs)
public TransportConnector getConnectorByName(String connectorName)
public Map<String,String> getTransportConnectorURIsAsMap()
public ProducerBrokerExchange getProducerBrokerExchange(org.apache.activemq.command.ProducerInfo producerInfo)
public String[] getTransportConnectorURIs()
public void setTransportConnectorURIs(String[] transportConnectorURIs)
public JmsConnector[] getJmsBridgeConnectors()
public void setJmsBridgeConnectors(JmsConnector[] jmsConnectors)
jmsConnectors
- The jmsBridgeConnectors to set.public org.apache.activemq.Service[] getServices()
public void setServices(org.apache.activemq.Service[] services)
public void addService(org.apache.activemq.Service service)
public void removeService(org.apache.activemq.Service service)
public boolean isUseLoggingForShutdownErrors()
public void setUseLoggingForShutdownErrors(boolean useLoggingForShutdownErrors)
public boolean isUseShutdownHook()
public void setUseShutdownHook(boolean useShutdownHook)
public boolean isAdvisorySupport()
public void setAdvisorySupport(boolean advisorySupport)
public List<TransportConnector> getTransportConnectors()
public void setTransportConnectors(List<TransportConnector> transportConnectors) throws Exception
Exception
public TransportConnector getTransportConnectorByName(String name)
public TransportConnector getTransportConnectorByScheme(String scheme)
public List<NetworkConnector> getNetworkConnectors()
public List<ProxyConnector> getProxyConnectors()
public void setNetworkConnectors(List<?> networkConnectors) throws Exception
Exception
public void setProxyConnectors(List<?> proxyConnectors) throws Exception
Exception
public PolicyMap getDestinationPolicy()
public void setDestinationPolicy(PolicyMap policyMap)
public BrokerPlugin[] getPlugins()
public void setPlugins(BrokerPlugin[] plugins)
public MessageAuthorizationPolicy getMessageAuthorizationPolicy()
public void setMessageAuthorizationPolicy(MessageAuthorizationPolicy messageAuthorizationPolicy)
public void deleteAllMessages() throws IOException
IOException
public boolean isDeleteAllMessagesOnStartup()
public void setDeleteAllMessagesOnStartup(boolean deletePersistentMessagesOnStartup)
public URI getVmConnectorURI()
public void setVmConnectorURI(URI vmConnectorURI)
public String getDefaultSocketURIString()
public boolean isShutdownOnMasterFailure()
public void setShutdownOnMasterFailure(boolean shutdownOnMasterFailure)
shutdownOnMasterFailure
- The shutdownOnMasterFailure to set.public boolean isKeepDurableSubsActive()
public void setKeepDurableSubsActive(boolean keepDurableSubsActive)
public boolean isUseVirtualTopics()
public void setUseVirtualTopics(boolean useVirtualTopics)
public DestinationInterceptor[] getDestinationInterceptors()
public boolean isUseMirroredQueues()
public void setUseMirroredQueues(boolean useMirroredQueues)
public void setDestinationInterceptors(DestinationInterceptor[] destinationInterceptors)
public org.apache.activemq.command.ActiveMQDestination[] getDestinations()
public void setDestinations(org.apache.activemq.command.ActiveMQDestination[] destinations)
public PListStore getTempDataStore()
public void setTempDataStore(PListStore tempDataStore)
tempDataStore
- the tempDataStore to setpublic int getPersistenceThreadPriority()
public void setPersistenceThreadPriority(int persistenceThreadPriority)
public boolean isUseLocalHostBrokerName()
public void setUseLocalHostBrokerName(boolean useLocalHostBrokerName)
useLocalHostBrokerName
- the useLocalHostBrokerName to setpublic Destination getDestination(org.apache.activemq.command.ActiveMQDestination destination) throws Exception
Exception
public void removeDestination(org.apache.activemq.command.ActiveMQDestination destination) throws Exception
Exception
public int getProducerSystemUsagePortion()
public void setProducerSystemUsagePortion(int producerSystemUsagePortion)
public int getConsumerSystemUsagePortion()
public void setConsumerSystemUsagePortion(int consumerSystemUsagePortion)
public boolean isSplitSystemUsageForProducersConsumers()
public void setSplitSystemUsageForProducersConsumers(boolean splitSystemUsageForProducersConsumers)
public boolean isMonitorConnectionSplits()
public void setMonitorConnectionSplits(boolean monitorConnectionSplits)
public int getTaskRunnerPriority()
public void setTaskRunnerPriority(int taskRunnerPriority)
public boolean isDedicatedTaskRunner()
public void setDedicatedTaskRunner(boolean dedicatedTaskRunner)
public boolean isCacheTempDestinations()
public void setCacheTempDestinations(boolean cacheTempDestinations)
public int getTimeBeforePurgeTempDestinations()
public void setTimeBeforePurgeTempDestinations(int timeBeforePurgeTempDestinations)
public boolean isUseTempMirroredQueues()
public void setUseTempMirroredQueues(boolean useTempMirroredQueues)
public JobSchedulerStore getJobSchedulerStore()
public void setJobSchedulerStore(JobSchedulerStore jobSchedulerStore)
protected void processHelperProperties() throws Exception
Exception
protected void checkStoreUsageLimits() throws Exception
Exception
protected void checkTmpStoreUsageLimits() throws Exception
Exception
protected void checkUsageLimit(File dir, PercentLimitUsage<?> storeUsage, int percentLimit) throws org.apache.activemq.ConfigurationException
org.apache.activemq.ConfigurationException
protected void scheduleDiskUsageLimitsCheck() throws IOException
IOException
protected void checkMemorySystemUsageLimits() throws Exception
Exception
protected void checkStoreSystemUsageLimits() throws Exception
Exception
public void stopAllConnectors(org.apache.activemq.util.ServiceStopper stopper)
protected TransportConnector registerConnectorMBean(TransportConnector connector) throws IOException
IOException
protected void unregisterConnectorMBean(TransportConnector connector) throws IOException
IOException
protected PersistenceAdapter registerPersistenceAdapterMBean(PersistenceAdapter adaptor) throws IOException
IOException
protected void unregisterPersistenceAdapterMBean(PersistenceAdapter adaptor) throws IOException
IOException
public void registerNetworkConnectorMBean(NetworkConnector connector) throws IOException
IOException
public ObjectName createNetworkConnectorObjectName(NetworkConnector connector) throws MalformedObjectNameException
MalformedObjectNameException
public ObjectName createDuplexNetworkConnectorObjectName(String transport) throws MalformedObjectNameException
MalformedObjectNameException
protected void unregisterNetworkConnectorMBean(NetworkConnector connector)
protected void registerProxyConnectorMBean(ProxyConnector connector) throws IOException
IOException
protected void registerJmsConnectorMBean(JmsConnector connector) throws IOException
IOException
protected Broker createBroker() throws Exception
Exception
protected Broker createRegionBroker() throws Exception
Exception
protected Broker createRegionBroker(DestinationInterceptor destinationInterceptor) throws IOException
IOException
protected DestinationInterceptor[] createDefaultDestinationInterceptor()
protected Broker addInterceptors(Broker broker) throws Exception
IOException
Exception
protected PersistenceAdapter createPersistenceAdapter() throws IOException
IOException
protected ObjectName createBrokerObjectName() throws MalformedObjectNameException
MalformedObjectNameException
protected TransportConnector createTransportConnector(URI brokerURI) throws Exception
Exception
protected void addShutdownHook()
protected void removeShutdownHook()
public void setShutdownHooks(List<Runnable> hooks) throws Exception
Exception
protected void containerShutdown()
protected void startDestinations() throws Exception
Exception
public ConnectionContext getAdminConnectionContext() throws Exception
Exception
protected void startManagementContext() throws Exception
Exception
public void startAllConnectors() throws Exception
Exception
public void startNetworkConnector(NetworkConnector connector, ThreadPoolExecutor networkConnectorStartExecutor) throws Exception
Exception
public void startNetworkConnector(NetworkConnector connector, Set<org.apache.activemq.command.ActiveMQDestination> durableDestinations, ThreadPoolExecutor networkConnectorStartExecutor) throws Exception
Exception
public TransportConnector startTransportConnector(TransportConnector connector) throws Exception
Exception
protected void configureServices(Object[] services)
protected void configureService(Object service)
public void handleIOException(IOException exception)
protected void startVirtualConsumerDestinations() throws Exception
Exception
protected ThreadPoolExecutor getExecutor()
public org.apache.activemq.thread.Scheduler getScheduler()
public Broker getRegionBroker()
public void setRegionBroker(Broker regionBroker)
public final void removePreShutdownHook(Runnable hook)
public void addShutdownHook(Runnable hook)
public void removeShutdownHook(Runnable hook)
public boolean isSystemExitOnShutdown()
public void setSystemExitOnShutdown(boolean systemExitOnShutdown)
public int getSystemExitOnShutdownExitCode()
public void setSystemExitOnShutdownExitCode(int systemExitOnShutdownExitCode)
public org.apache.activemq.broker.SslContext getSslContext()
public void setSslContext(org.apache.activemq.broker.SslContext sslContext)
public boolean isShutdownOnSlaveFailure()
public void setShutdownOnSlaveFailure(boolean shutdownOnSlaveFailure)
public boolean isWaitForSlave()
public void setWaitForSlave(boolean waitForSlave)
public long getWaitForSlaveTimeout()
public void setWaitForSlaveTimeout(long waitForSlaveTimeout)
public boolean isPassiveSlave()
public void setPassiveSlave(boolean passiveSlave)
passiveSlave
- the passiveSlave to setpublic void setIoExceptionHandler(IOExceptionHandler ioExceptionHandler)
ioExceptionHandler
- public IOExceptionHandler getIoExceptionHandler()
public boolean isSchedulerSupport()
public void setSchedulerSupport(boolean schedulerSupport)
schedulerSupport
- the schedulerSupport to setpublic File getSchedulerDirectoryFile()
public void setSchedulerDirectoryFile(File schedulerDirectory)
schedulerDirectory
- the schedulerDirectory to setpublic void setSchedulerDirectory(String schedulerDirectory)
public int getSchedulePeriodForDestinationPurge()
public void setSchedulePeriodForDestinationPurge(int schedulePeriodForDestinationPurge)
public void setSchedulePeriodForDiskUsageCheck(int schedulePeriodForDiskUsageCheck)
schedulePeriodForDiskUsageCheck
- public int getDiskUsageCheckRegrowThreshold()
public void setDiskUsageCheckRegrowThreshold(int diskUsageCheckRegrowThreshold)
diskUsageCheckRegrowThreshold
- public int getMaxPurgedDestinationsPerSweep()
public void setMaxPurgedDestinationsPerSweep(int maxPurgedDestinationsPerSweep)
public BrokerContext getBrokerContext()
public void setBrokerContext(BrokerContext brokerContext)
public void setBrokerId(String brokerId)
public boolean isUseAuthenticatedPrincipalForJMSXUserID()
public void setUseAuthenticatedPrincipalForJMSXUserID(boolean useAuthenticatedPrincipalForJMSXUserID)
public boolean isPopulateUserNameInMBeans()
public void setPopulateUserNameInMBeans(boolean value)
value
- if MBeans should expose user name information.public long getMbeanInvocationTimeout()
public void setMbeanInvocationTimeout(long mbeanInvocationTimeout)
mbeanInvocationTimeout
- timeout in milliseconds before MBean calls fail, (default is 0 or no timeout).public boolean isNetworkConnectorStartAsync()
public void setNetworkConnectorStartAsync(boolean networkConnectorStartAsync)
public boolean isAllowTempAutoCreationOnSend()
public void setAllowTempAutoCreationOnSend(boolean allowTempAutoCreationOnSend)
allowTempAutoCreationOnSend
- public long getOfflineDurableSubscriberTimeout()
public void setOfflineDurableSubscriberTimeout(long offlineDurableSubscriberTimeout)
public long getOfflineDurableSubscriberTaskSchedule()
public void setOfflineDurableSubscriberTaskSchedule(long offlineDurableSubscriberTaskSchedule)
public boolean shouldRecordVirtualDestination(org.apache.activemq.command.ActiveMQDestination destination)
public Throwable getStartException()
public boolean isStartAsync()
public void setStartAsync(boolean startAsync)
public boolean isSlave()
public boolean isStopping()
public boolean isRestartAllowed()
public void setRestartAllowed(boolean restartAllowed)
public boolean isRestartRequested()
public void requestRestart()
public int getStoreOpenWireVersion()
public void setStoreOpenWireVersion(int storeOpenWireVersion)
public int getCurrentConnections()
public long getTotalConnections()
public void incrementCurrentConnections()
public void decrementCurrentConnections()
public void incrementTotalConnections()
public boolean isRejectDurableConsumers()
public void setRejectDurableConsumers(boolean rejectDurableConsumers)
public boolean isUseVirtualDestSubs()
public void setUseVirtualDestSubs(boolean useVirtualDestSubs)
public boolean isUseVirtualDestSubsOnCreation()
public void setUseVirtualDestSubsOnCreation(boolean useVirtualDestSubsOnCreation)
public boolean isAdjustUsageLimits()
public void setAdjustUsageLimits(boolean adjustUsageLimits)
public void setRollbackOnlyOnAsyncException(boolean rollbackOnlyOnAsyncException)
public boolean isRollbackOnlyOnAsyncException()
Copyright © 2005–2019 The Apache Software Foundation. All rights reserved.