| java.lang.Object org.jboss.mq.server.MessageCounter
MessageCounter | public class MessageCounter (Code) | | This class stores message count informations for a given queue
author: Ulf Schroeter (u.schroeter@mobilcom.de) author: Stephan Steinbacher (s.steinbacher@mobilcom.de) version: $Revision: 57198 $ |
Inner Class :static class DayCounter | |
countTotal | int countTotal(Code) | | |
countTotalLast | int countTotalLast(Code) | | |
dayCounterMax | int dayCounterMax(Code) | | |
destDurable | boolean destDurable(Code) | | |
destTopic | boolean destTopic(Code) | | |
timeLastUpdate | long timeLastUpdate(Code) | | |
MessageCounter | public MessageCounter(String name, String subscription, BasicQueue queue, boolean topic, boolean durable, int daycountmax)(Code) | | Constructor
Parameters: name - destination name Parameters: subscription - subscription name Parameters: queue - internal queue object Parameters: topic - topic destination flag Parameters: durable - durable subsciption flag Parameters: daycountmax - max message history day count |
getCount | public int getCount()(Code) | | Gets the total message count since startup or
last counter reset
int message count |
getCountDelta | public int getCountDelta()(Code) | | Gets the message count delta since last method call
int message count delta |
getCounterAsString | public String getCounterAsString()(Code) | | Get message counter data as string in format
"Topic/Queue, Name, Subscription, Durable, Count, CountDelta,
Depth, DepthDelta, Timestamp Last Increment"
String message counter data string |
getDepth | public int getDepth()(Code) | | Gets the current message count of pending messages
within the destination waiting for dispatch
int message queue depth |
getDepthDelta | public int getDepthDelta()(Code) | | Gets the message count delta of pending messages
since last method call. Therefore
int message queue depth delta |
getDestinationDurable | public boolean getDestinationDurable()(Code) | | Gets the related destination durable subscription flag
boolean true : durable subscription,false: non-durable subscription |
getDestinationName | public String getDestinationName()(Code) | | Gets the related destination name
String destination name |
getDestinationSubscription | public String getDestinationSubscription()(Code) | | Gets the related destination subscription
String destination name |
getDestinationTopic | public boolean getDestinationTopic()(Code) | | Gets the related destination topic flag
boolean true: topic destination, false: queue destination |
getHistoryAsString | public String getHistoryAsString()(Code) | | Get message counter history data as string in format
"day count\n
Date 1, hour counter 0, hour counter 1, ..., hour counter 23\n
Date 2, hour counter 0, hour counter 1, ..., hour counter 23\n
.....
.....
Date n, hour counter 0, hour counter 1, ..., hour counter 23\n"
String message history data string |
getHistoryLimit | public int getHistoryLimit()(Code) | | Get message counter history day count limit
<0: unlimited, 0: history disabled, >0: day count
|
getLastUpdate | public long getLastUpdate()(Code) | | Gets the timestamp of the last message add
long system time |
getMessageStatistics | public static MessageStatistics[] getMessageStatistics(MessageCounter[] counter) throws Exception(Code) | | Get an array of message statistics from an array of message counters
Parameters: counter - the message counters the message statistics throws: Exception - for any error |
incrementCounter | public void incrementCounter()(Code) | | Increment message counter and update message history
|
resetCounter | public void resetCounter()(Code) | | Reset message counter values
|
resetHistory | public void resetHistory()(Code) | | Reset message counter history
|
setHistoryLimit | public void setHistoryLimit(int daycountmax)(Code) | | Set message counter history day count limit
<0: unlimited, 0: history disabled, >0: day count
|
toString | public String toString()(Code) | | Get string representation
|
|
|