Class QueueControlImpl
- java.lang.Object
-
- javax.management.StandardMBean
-
- org.apache.activemq.artemis.core.management.impl.AbstractControl
-
- org.apache.activemq.artemis.core.management.impl.QueueControlImpl
-
- All Implemented Interfaces:
DynamicMBean,MBeanRegistration,QueueControl
public class QueueControlImpl extends AbstractControl implements QueueControl
-
-
Field Summary
Fields Modifier and Type Field Description static intFLUSH_LIMIT-
Fields inherited from interface org.apache.activemq.artemis.api.core.management.QueueControl
CONSUMER_COUNT_DESCRIPTION, DELIVERING_MESSAGE_COUNT_DESCRIPTION, DELIVERING_SIZE_DESCRIPTION, DURABLE_DELIVERING_MESSAGE_COUNT_DESCRIPTION, DURABLE_DELIVERING_SIZE_DESCRIPTION, DURABLE_MESSAGE_COUNT_DESCRIPTION, DURABLE_PERSISTENT_SIZE_DESCRIPTION, DURABLE_SCHEDULED_MESSAGE_COUNT_DESCRIPTION, DURABLE_SCHEDULED_SIZE_DESCRIPTION, MESSAGE_COUNT_DESCRIPTION, MESSAGES_ACKNOWLEDGED_DESCRIPTION, MESSAGES_ADDED_DESCRIPTION, MESSAGES_EXPIRED_DESCRIPTION, MESSAGES_KILLED_DESCRIPTION, PERSISTENT_SIZE_DESCRIPTION, SCHEDULED_MESSAGE_COUNT_DESCRIPTION, SCHEDULED_SIZE_DESCRIPTION
-
-
Constructor Summary
Constructors Constructor Description QueueControlImpl(Queue queue, String address, ActiveMQServer server, StorageManager storageManager, SecurityStore securityStore, HierarchicalRepository<AddressSettings> addressSettingsRepository)
-
Method Summary
-
Methods inherited from class org.apache.activemq.artemis.core.management.impl.AbstractControl
blockOnIO, clearIO, getMBeanInfo, sendMessage, tcclCall, tcclInvoke
-
Methods inherited from class javax.management.StandardMBean
cacheMBeanInfo, getAttribute, getAttributes, getCachedMBeanInfo, getClassName, getConstructors, getDescription, getDescription, getDescription, getDescription, getDescription, getDescription, getDescription, getImpact, getImplementation, getImplementationClass, getMBeanInterface, getParameterName, getParameterName, invoke, postDeregister, postRegister, preDeregister, preRegister, setAttribute, setAttributes, setImplementation
-
-
-
-
Field Detail
-
FLUSH_LIMIT
public static final int FLUSH_LIMIT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
QueueControlImpl
public QueueControlImpl(Queue queue, String address, ActiveMQServer server, StorageManager storageManager, SecurityStore securityStore, HierarchicalRepository<AddressSettings> addressSettingsRepository) throws Exception
- Throws:
Exception
-
-
Method Detail
-
setMessageCounter
public void setMessageCounter(MessageCounter counter)
-
getName
public String getName()
- Specified by:
getNamein interfaceQueueControl
-
getAddress
public String getAddress()
- Specified by:
getAddressin interfaceQueueControl
-
getFilter
public String getFilter()
- Specified by:
getFilterin interfaceQueueControl
-
isDurable
public boolean isDurable()
- Specified by:
isDurablein interfaceQueueControl
-
getUser
public String getUser()
- Specified by:
getUserin interfaceQueueControl
-
getRoutingType
public String getRoutingType()
- Specified by:
getRoutingTypein interfaceQueueControl
-
isTemporary
public boolean isTemporary()
- Specified by:
isTemporaryin interfaceQueueControl
-
isRetroactiveResource
public boolean isRetroactiveResource()
- Specified by:
isRetroactiveResourcein interfaceQueueControl
-
getMessageCount
public long getMessageCount()
- Specified by:
getMessageCountin interfaceQueueControl
-
getPersistentSize
public long getPersistentSize()
- Specified by:
getPersistentSizein interfaceQueueControl
-
getDurableMessageCount
public long getDurableMessageCount()
- Specified by:
getDurableMessageCountin interfaceQueueControl
-
getDurablePersistentSize
public long getDurablePersistentSize()
- Specified by:
getDurablePersistentSizein interfaceQueueControl
-
getConsumerCount
public int getConsumerCount()
- Specified by:
getConsumerCountin interfaceQueueControl
-
getDeliveringCount
public int getDeliveringCount()
- Specified by:
getDeliveringCountin interfaceQueueControl
-
getDeliveringSize
public long getDeliveringSize()
- Specified by:
getDeliveringSizein interfaceQueueControl
-
getDurableDeliveringCount
public int getDurableDeliveringCount()
- Specified by:
getDurableDeliveringCountin interfaceQueueControl
-
getDurableDeliveringSize
public long getDurableDeliveringSize()
- Specified by:
getDurableDeliveringSizein interfaceQueueControl
-
getMessagesAdded
public long getMessagesAdded()
- Specified by:
getMessagesAddedin interfaceQueueControl
-
getMessagesAcknowledged
public long getMessagesAcknowledged()
- Specified by:
getMessagesAcknowledgedin interfaceQueueControl
-
getAcknowledgeAttempts
public long getAcknowledgeAttempts()
- Specified by:
getAcknowledgeAttemptsin interfaceQueueControl
-
getMessagesExpired
public long getMessagesExpired()
- Specified by:
getMessagesExpiredin interfaceQueueControl
-
getMessagesKilled
public long getMessagesKilled()
- Specified by:
getMessagesKilledin interfaceQueueControl
-
getID
public long getID()
- Specified by:
getIDin interfaceQueueControl
-
getScheduledCount
public long getScheduledCount()
- Specified by:
getScheduledCountin interfaceQueueControl
-
getScheduledSize
public long getScheduledSize()
- Specified by:
getScheduledSizein interfaceQueueControl
-
getDurableScheduledCount
public long getDurableScheduledCount()
- Specified by:
getDurableScheduledCountin interfaceQueueControl
-
getDurableScheduledSize
public long getDurableScheduledSize()
- Specified by:
getDurableScheduledSizein interfaceQueueControl
-
getDeadLetterAddress
public String getDeadLetterAddress()
- Specified by:
getDeadLetterAddressin interfaceQueueControl
-
getExpiryAddress
public String getExpiryAddress()
- Specified by:
getExpiryAddressin interfaceQueueControl
-
getMaxConsumers
public int getMaxConsumers()
- Specified by:
getMaxConsumersin interfaceQueueControl
-
isPurgeOnNoConsumers
public boolean isPurgeOnNoConsumers()
- Specified by:
isPurgeOnNoConsumersin interfaceQueueControl
-
disable
public void disable() throws Exception- Specified by:
disablein interfaceQueueControl- Throws:
Exception
-
enable
public void enable() throws Exception- Specified by:
enablein interfaceQueueControl- Throws:
Exception
-
isEnabled
public boolean isEnabled()
- Specified by:
isEnabledin interfaceQueueControl
-
isConfigurationManaged
public boolean isConfigurationManaged()
- Specified by:
isConfigurationManagedin interfaceQueueControl
-
isExclusive
public boolean isExclusive()
- Specified by:
isExclusivein interfaceQueueControl
-
isLastValue
public boolean isLastValue()
- Specified by:
isLastValuein interfaceQueueControl
-
getLastValueKey
public String getLastValueKey()
- Specified by:
getLastValueKeyin interfaceQueueControl
-
getConsumersBeforeDispatch
public int getConsumersBeforeDispatch()
- Specified by:
getConsumersBeforeDispatchin interfaceQueueControl
-
getDelayBeforeDispatch
public long getDelayBeforeDispatch()
- Specified by:
getDelayBeforeDispatchin interfaceQueueControl
-
listScheduledMessages
public Map<String,Object>[] listScheduledMessages() throws Exception
- Specified by:
listScheduledMessagesin interfaceQueueControl- Throws:
Exception
-
listScheduledMessagesAsJSON
public String listScheduledMessagesAsJSON() throws Exception
- Specified by:
listScheduledMessagesAsJSONin interfaceQueueControl- Throws:
Exception
-
listDeliveringMessages
public Map<String,Map<String,Object>[]> listDeliveringMessages() throws ActiveMQException
- Specified by:
listDeliveringMessagesin interfaceQueueControl- Throws:
ActiveMQException
-
listDeliveringMessagesAsJSON
public String listDeliveringMessagesAsJSON() throws Exception
- Specified by:
listDeliveringMessagesAsJSONin interfaceQueueControl- Throws:
Exception
-
listMessages
public Map<String,Object>[] listMessages(String filterStr) throws Exception
- Specified by:
listMessagesin interfaceQueueControl- Throws:
Exception
-
listMessagesAsJSON
public String listMessagesAsJSON(String filter) throws Exception
- Specified by:
listMessagesAsJSONin interfaceQueueControl- Throws:
Exception
-
getFirstMessage
protected Map<String,Object> getFirstMessage() throws Exception
this method returns a Map representing the first message. or null if there's no first message.- Returns:
- Throws:
Exception
-
getFirstMessageAsJSON
public String getFirstMessageAsJSON() throws Exception
- Specified by:
getFirstMessageAsJSONin interfaceQueueControl- Throws:
Exception
-
getFirstMessageTimestamp
public Long getFirstMessageTimestamp() throws Exception
- Specified by:
getFirstMessageTimestampin interfaceQueueControl- Throws:
Exception
-
getFirstMessageAge
public Long getFirstMessageAge() throws Exception
- Specified by:
getFirstMessageAgein interfaceQueueControl- Throws:
Exception
-
countMessages
public long countMessages() throws Exception- Specified by:
countMessagesin interfaceQueueControl- Throws:
Exception
-
countMessages
public long countMessages(String filterStr) throws Exception
- Specified by:
countMessagesin interfaceQueueControl- Throws:
Exception
-
countMessages
public String countMessages(String filterStr, String groupByProperty) throws Exception
- Specified by:
countMessagesin interfaceQueueControl- Throws:
Exception
-
countDeliveringMessages
public long countDeliveringMessages(String filterStr) throws Exception
- Specified by:
countDeliveringMessagesin interfaceQueueControl- Throws:
Exception
-
countDeliveringMessages
public String countDeliveringMessages(String filterStr, String groupByProperty) throws Exception
- Specified by:
countDeliveringMessagesin interfaceQueueControl- Throws:
Exception
-
removeMessage
public boolean removeMessage(long messageID) throws Exception- Specified by:
removeMessagein interfaceQueueControl- Throws:
Exception
-
removeMessages
public int removeMessages(String filterStr) throws Exception
- Specified by:
removeMessagesin interfaceQueueControl- Throws:
Exception
-
removeMessages
public int removeMessages(int flushLimit, String filterStr) throws Exception- Specified by:
removeMessagesin interfaceQueueControl- Throws:
Exception
-
removeAllMessages
public int removeAllMessages() throws Exception- Specified by:
removeAllMessagesin interfaceQueueControl- Throws:
Exception
-
expireMessage
public boolean expireMessage(long messageID) throws Exception- Specified by:
expireMessagein interfaceQueueControl- Throws:
Exception
-
expireMessages
public int expireMessages(String filterStr) throws Exception
- Specified by:
expireMessagesin interfaceQueueControl- Throws:
Exception
-
retryMessage
public boolean retryMessage(long messageID) throws Exception- Specified by:
retryMessagein interfaceQueueControl- Throws:
Exception
-
retryMessages
public int retryMessages() throws Exception- Specified by:
retryMessagesin interfaceQueueControl- Throws:
Exception
-
moveMessage
public boolean moveMessage(long messageID, String otherQueueName) throws Exception- Specified by:
moveMessagein interfaceQueueControl- Throws:
Exception
-
moveMessage
public boolean moveMessage(long messageID, String otherQueueName, boolean rejectDuplicates) throws Exception- Specified by:
moveMessagein interfaceQueueControl- Throws:
Exception
-
moveMessages
public int moveMessages(String filterStr, String otherQueueName) throws Exception
- Specified by:
moveMessagesin interfaceQueueControl- Throws:
Exception
-
moveMessages
public int moveMessages(int flushLimit, String filterStr, String otherQueueName, boolean rejectDuplicates) throws Exception- Specified by:
moveMessagesin interfaceQueueControl- Throws:
Exception
-
moveMessages
public int moveMessages(int flushLimit, String filterStr, String otherQueueName, boolean rejectDuplicates, int messageCount) throws Exception- Specified by:
moveMessagesin interfaceQueueControl- Throws:
Exception
-
moveMessages
public int moveMessages(String filterStr, String otherQueueName, boolean rejectDuplicates) throws Exception
- Specified by:
moveMessagesin interfaceQueueControl- Throws:
Exception
-
sendMessagesToDeadLetterAddress
public int sendMessagesToDeadLetterAddress(String filterStr) throws Exception
- Specified by:
sendMessagesToDeadLetterAddressin interfaceQueueControl- Throws:
Exception
-
sendMessage
public String sendMessage(Map<String,String> headers, int type, String body, boolean durable, String user, String password) throws Exception
- Specified by:
sendMessagein interfaceQueueControl- Throws:
Exception
-
sendMessage
public String sendMessage(Map<String,String> headers, int type, String body, boolean durable, String user, String password, boolean createMessageId) throws Exception
- Specified by:
sendMessagein interfaceQueueControl- Throws:
Exception
-
sendMessageToDeadLetterAddress
public boolean sendMessageToDeadLetterAddress(long messageID) throws Exception- Specified by:
sendMessageToDeadLetterAddressin interfaceQueueControl- Throws:
Exception
-
changeMessagesPriority
public int changeMessagesPriority(String filterStr, int newPriority) throws Exception
- Specified by:
changeMessagesPriorityin interfaceQueueControl- Throws:
Exception
-
changeMessagePriority
public boolean changeMessagePriority(long messageID, int newPriority) throws Exception- Specified by:
changeMessagePriorityin interfaceQueueControl- Throws:
Exception
-
listMessageCounter
public String listMessageCounter()
- Specified by:
listMessageCounterin interfaceQueueControl
-
resetMessageCounter
public void resetMessageCounter()
- Specified by:
resetMessageCounterin interfaceQueueControl
-
listMessageCounterAsHTML
@Deprecated public String listMessageCounterAsHTML()
Deprecated.- Specified by:
listMessageCounterAsHTMLin interfaceQueueControl
-
listMessageCounterHistory
public String listMessageCounterHistory() throws Exception
- Specified by:
listMessageCounterHistoryin interfaceQueueControl- Throws:
Exception
-
listMessageCounterHistoryAsHTML
@Deprecated public String listMessageCounterHistoryAsHTML()
Deprecated.- Specified by:
listMessageCounterHistoryAsHTMLin interfaceQueueControl
-
pause
public void pause()
- Specified by:
pausein interfaceQueueControl
-
pause
public void pause(boolean persist)
- Specified by:
pausein interfaceQueueControl
-
resume
public void resume()
- Specified by:
resumein interfaceQueueControl
-
isPaused
public boolean isPaused() throws Exception- Specified by:
isPausedin interfaceQueueControl- Throws:
Exception
-
browse
public CompositeData[] browse(int page, int pageSize) throws Exception
- Specified by:
browsein interfaceQueueControl- Throws:
Exception
-
browse
public CompositeData[] browse(int page, int pageSize, String filter) throws Exception
- Specified by:
browsein interfaceQueueControl- Throws:
Exception
-
browse
public CompositeData[] browse() throws Exception
- Specified by:
browsein interfaceQueueControl- Throws:
Exception
-
browse
public CompositeData[] browse(String filter) throws Exception
- Specified by:
browsein interfaceQueueControl- Throws:
Exception
-
flushExecutor
public void flushExecutor()
- Specified by:
flushExecutorin interfaceQueueControl
-
resetAllGroups
public void resetAllGroups()
- Specified by:
resetAllGroupsin interfaceQueueControl
-
resetGroup
public void resetGroup(String groupID)
- Specified by:
resetGroupin interfaceQueueControl
-
getGroupCount
public int getGroupCount()
- Specified by:
getGroupCountin interfaceQueueControl
-
listGroupsAsJSON
public String listGroupsAsJSON() throws Exception
- Specified by:
listGroupsAsJSONin interfaceQueueControl- Throws:
Exception
-
getRingSize
public long getRingSize()
- Specified by:
getRingSizein interfaceQueueControl
-
listConsumersAsJSON
public String listConsumersAsJSON() throws Exception
- Specified by:
listConsumersAsJSONin interfaceQueueControl- Throws:
Exception
-
fillMBeanOperationInfo
protected MBeanOperationInfo[] fillMBeanOperationInfo()
- Specified by:
fillMBeanOperationInfoin classAbstractControl
-
fillMBeanAttributeInfo
protected MBeanAttributeInfo[] fillMBeanAttributeInfo()
- Specified by:
fillMBeanAttributeInfoin classAbstractControl
-
resetMessagesAdded
public void resetMessagesAdded() throws Exception- Specified by:
resetMessagesAddedin interfaceQueueControl- Throws:
Exception
-
resetMessagesAcknowledged
public void resetMessagesAcknowledged() throws Exception- Specified by:
resetMessagesAcknowledgedin interfaceQueueControl- Throws:
Exception
-
resetMessagesExpired
public void resetMessagesExpired() throws Exception- Specified by:
resetMessagesExpiredin interfaceQueueControl- Throws:
Exception
-
resetMessagesKilled
public void resetMessagesKilled() throws Exception- Specified by:
resetMessagesKilledin interfaceQueueControl- Throws:
Exception
-
isGroupRebalance
public boolean isGroupRebalance()
- Specified by:
isGroupRebalancein interfaceQueueControl
-
isGroupRebalancePauseDispatch
public boolean isGroupRebalancePauseDispatch()
- Specified by:
isGroupRebalancePauseDispatchin interfaceQueueControl
-
getGroupBuckets
public int getGroupBuckets()
- Specified by:
getGroupBucketsin interfaceQueueControl
-
getGroupFirstKey
public String getGroupFirstKey()
- Specified by:
getGroupFirstKeyin interfaceQueueControl
-
getPreparedTransactionMessageCount
public int getPreparedTransactionMessageCount()
- Specified by:
getPreparedTransactionMessageCountin interfaceQueueControl
-
deliverScheduledMessages
public void deliverScheduledMessages(String filter) throws Exception
- Specified by:
deliverScheduledMessagesin interfaceQueueControl- Throws:
Exception
-
deliverScheduledMessage
public void deliverScheduledMessage(long messageId) throws Exception- Specified by:
deliverScheduledMessagein interfaceQueueControl- Throws:
Exception
-
isAutoDelete
public boolean isAutoDelete()
- Specified by:
isAutoDeletein interfaceQueueControl
-
-