public class DestinationView extends Object implements DestinationViewMBean
Modifier and Type | Field and Description |
---|---|
protected ManagedRegionBroker |
broker |
protected Destination |
destination |
Constructor and Description |
---|
DestinationView(ManagedRegionBroker broker,
Destination destination) |
Modifier and Type | Method and Description |
---|---|
CompositeData[] |
browse() |
CompositeData[] |
browse(String selector) |
TabularData |
browseAsTable() |
TabularData |
browseAsTable(String selector) |
List<Object> |
browseMessages()
Browses the current destination returning a list of messages
|
List<Object> |
browseMessages(String selector)
Browses the current destination with the given selector returning a list
of messages
|
void |
gc() |
double |
getAverageEnqueueTime() |
long |
getBlockedProducerWarningInterval() |
long |
getConsumerCount()
Returns the number of consumers subscribed this destination.
|
long |
getDequeueCount()
Returns the number of messages that have been acknowledged from the
destination.
|
long |
getDispatchCount()
Returns the number of messages that have been delivered (potentially not
acknowledged) to consumers.
|
long |
getEnqueueCount()
Returns the number of messages that have been sent to the destination.
|
long |
getExpiredCount()
Returns the number of messages that have expired
|
long |
getInFlightCount()
Returns the number of messages that have been dispatched but not
acknowledged
|
int |
getMaxAuditDepth() |
long |
getMaxEnqueueTime() |
int |
getMaxPageSize() |
int |
getMaxProducersToAudit() |
long |
getMemoryLimit() |
int |
getMemoryPercentUsage() |
float |
getMemoryUsagePortion() |
long |
getMessagesCached() |
long |
getMinEnqueueTime() |
String |
getName()
Returns the name of this destination
|
long |
getProducerCount() |
long |
getQueueSize()
Returns the number of messages in this destination which are yet to be
consumed
|
ObjectName |
getSlowConsumerStrategy()
Returns the slow consumer strategy MBean for this destination
|
ObjectName[] |
getSubscriptions()
Returns all the current subscription MBeans matching this destination
|
boolean |
isAlwaysRetroactive() |
boolean |
isEnableAudit() |
boolean |
isPrioritizedMessages() |
boolean |
isProducerFlowControl() |
boolean |
isUseCache() |
void |
resetStatistics()
Resets the managment counters.
|
String |
sendTextMessage(Map headers,
String body)
Sends a TextMesage to the destination.
|
String |
sendTextMessage(Map headers,
String body,
String userName,
String password) |
String |
sendTextMessage(String body)
Sends a TextMesage to the destination.
|
String |
sendTextMessage(String body,
String user,
String password)
Sends a TextMesage to the destination.
|
void |
setAlwaysRetroactive(boolean alwaysRetroactive) |
void |
setBlockedProducerWarningInterval(long blockedProducerWarningInterval)
Set's the interval at which warnings about producers being blocked by
resource usage will be triggered.
|
void |
setEnableAudit(boolean enableAudit) |
void |
setMaxAuditDepth(int maxAuditDepth) |
void |
setMaxPageSize(int pageSize) |
void |
setMaxProducersToAudit(int maxProducersToAudit) |
void |
setMemoryLimit(long limit)
set the amount of memory allocated to this destination
|
void |
setMemoryUsagePortion(float value)
set the portion of memory from the broker memory limit for this destination
|
void |
setProducerFlowControl(boolean producerFlowControl) |
void |
setUseCache(boolean value) |
protected final Destination destination
protected final ManagedRegionBroker broker
public DestinationView(ManagedRegionBroker broker, Destination destination)
public void gc()
public String getName()
DestinationViewMBean
getName
in interface DestinationViewMBean
public void resetStatistics()
DestinationViewMBean
resetStatistics
in interface DestinationViewMBean
public long getEnqueueCount()
DestinationViewMBean
getEnqueueCount
in interface DestinationViewMBean
public long getDequeueCount()
DestinationViewMBean
getDequeueCount
in interface DestinationViewMBean
public long getDispatchCount()
DestinationViewMBean
getDispatchCount
in interface DestinationViewMBean
public long getInFlightCount()
DestinationViewMBean
getInFlightCount
in interface DestinationViewMBean
public long getExpiredCount()
DestinationViewMBean
getExpiredCount
in interface DestinationViewMBean
public long getConsumerCount()
DestinationViewMBean
getConsumerCount
in interface DestinationViewMBean
public long getQueueSize()
DestinationViewMBean
getQueueSize
in interface DestinationViewMBean
public long getMessagesCached()
public int getMemoryPercentUsage()
getMemoryPercentUsage
in interface DestinationViewMBean
public long getMemoryLimit()
getMemoryLimit
in interface DestinationViewMBean
public void setMemoryLimit(long limit)
DestinationViewMBean
setMemoryLimit
in interface DestinationViewMBean
public double getAverageEnqueueTime()
getAverageEnqueueTime
in interface DestinationViewMBean
public long getMaxEnqueueTime()
getMaxEnqueueTime
in interface DestinationViewMBean
public long getMinEnqueueTime()
getMinEnqueueTime
in interface DestinationViewMBean
public boolean isPrioritizedMessages()
isPrioritizedMessages
in interface DestinationViewMBean
public CompositeData[] browse() throws OpenDataException
browse
in interface DestinationViewMBean
OpenDataException
public CompositeData[] browse(String selector) throws OpenDataException, javax.jms.InvalidSelectorException
browse
in interface DestinationViewMBean
javax.jms.InvalidSelectorException
OpenDataException
public List<Object> browseMessages() throws javax.jms.InvalidSelectorException
browseMessages
in interface DestinationViewMBean
javax.jms.InvalidSelectorException
public List<Object> browseMessages(String selector) throws javax.jms.InvalidSelectorException
browseMessages
in interface DestinationViewMBean
javax.jms.InvalidSelectorException
public TabularData browseAsTable() throws OpenDataException
browseAsTable
in interface DestinationViewMBean
OpenDataException
public TabularData browseAsTable(String selector) throws OpenDataException, javax.jms.InvalidSelectorException
browseAsTable
in interface DestinationViewMBean
javax.jms.InvalidSelectorException
OpenDataException
public String sendTextMessage(String body) throws Exception
DestinationViewMBean
sendTextMessage
in interface DestinationViewMBean
body
- the text to sendException
public String sendTextMessage(Map headers, String body) throws Exception
DestinationViewMBean
sendTextMessage
in interface DestinationViewMBean
headers
- the message headers and properties to set. Can only
container Strings maped to primitive types.body
- the text to sendException
public String sendTextMessage(String body, String user, String password) throws Exception
DestinationViewMBean
sendTextMessage
in interface DestinationViewMBean
body
- the text to sendException
public String sendTextMessage(Map headers, String body, String userName, String password) throws Exception
sendTextMessage
in interface DestinationViewMBean
headers
- the message headers and properties to set. Can only
container Strings maped to primitive types.body
- the text to sendException
public int getMaxAuditDepth()
getMaxAuditDepth
in interface DestinationViewMBean
public int getMaxProducersToAudit()
getMaxProducersToAudit
in interface DestinationViewMBean
public boolean isEnableAudit()
public void setEnableAudit(boolean enableAudit)
public void setMaxAuditDepth(int maxAuditDepth)
setMaxAuditDepth
in interface DestinationViewMBean
maxAuditDepth
- the maxAuditDepth to setpublic void setMaxProducersToAudit(int maxProducersToAudit)
setMaxProducersToAudit
in interface DestinationViewMBean
maxProducersToAudit
- the maxProducersToAudit to setpublic float getMemoryUsagePortion()
getMemoryUsagePortion
in interface DestinationViewMBean
public long getProducerCount()
getProducerCount
in interface DestinationViewMBean
public boolean isProducerFlowControl()
isProducerFlowControl
in interface DestinationViewMBean
public void setMemoryUsagePortion(float value)
DestinationViewMBean
setMemoryUsagePortion
in interface DestinationViewMBean
public void setProducerFlowControl(boolean producerFlowControl)
setProducerFlowControl
in interface DestinationViewMBean
producerFlowControl
- the producerFlowControl to setpublic boolean isAlwaysRetroactive()
isAlwaysRetroactive
in interface DestinationViewMBean
public void setAlwaysRetroactive(boolean alwaysRetroactive)
setAlwaysRetroactive
in interface DestinationViewMBean
alwaysRetroactive
- set as always retroActivepublic void setBlockedProducerWarningInterval(long blockedProducerWarningInterval)
setBlockedProducerWarningInterval
in interface DestinationViewMBean
blockedProducerWarningInterval
- the interval at which warning about
blocked producers will be triggered.public long getBlockedProducerWarningInterval()
getBlockedProducerWarningInterval
in interface DestinationViewMBean
public int getMaxPageSize()
getMaxPageSize
in interface DestinationViewMBean
public void setMaxPageSize(int pageSize)
setMaxPageSize
in interface DestinationViewMBean
pageSize
- Set the maximum number of messages to page into the destinationpublic boolean isUseCache()
isUseCache
in interface DestinationViewMBean
public void setUseCache(boolean value)
setUseCache
in interface DestinationViewMBean
value
- enable/disable caching on the destinationpublic ObjectName[] getSubscriptions() throws IOException, MalformedObjectNameException
DestinationViewMBean
getSubscriptions
in interface DestinationViewMBean
IOException
MalformedObjectNameException
public ObjectName getSlowConsumerStrategy() throws IOException, MalformedObjectNameException
DestinationViewMBean
getSlowConsumerStrategy
in interface DestinationViewMBean
IOException
MalformedObjectNameException
Copyright © 2005–2017 The Apache Software Foundation. All rights reserved.