|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.messaging.core.messagecounter.MessageCounter
public class MessageCounter
This class stores message count informations for a given queue At intervals this class samples the queue for message count data Note that the underlying queue *does not* update statistics every time a message is added since that would reall slow things down, instead we *sample* the queues at regular intervals - this means we are less intrusive on the queue
Nested Class Summary | |
---|---|
static class |
MessageCounter.DayCounter
Internal day counter class for one day hour based counter history |
Constructor Summary | |
---|---|
MessageCounter(java.lang.String name,
java.lang.String subscription,
QueueControl queue,
boolean topic,
boolean durable,
int daycountmax)
Constructor |
Method Summary | |
---|---|
long |
getCount()
Gets the total message count since startup or last counter reset |
long |
getCountDelta()
Gets the message count delta since last method call |
java.lang.String |
getDestinationName()
|
java.lang.String |
getDestinationSubscription()
|
java.util.List<MessageCounter.DayCounter> |
getHistory()
|
java.lang.String |
getHistoryAsString()
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 ..... |
long |
getLastAddedMessageTime()
|
long |
getLastUpdate()
|
int |
getMessageCount()
Gets the current message count of pending messages within the destination waiting for dispatch |
int |
getMessageCountDelta()
Gets the message count delta of pending messages since last method call. |
boolean |
isDestinationDurable()
|
boolean |
isDestinationTopic()
|
void |
onTimer()
|
void |
resetCounter()
|
void |
resetHistory()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MessageCounter(java.lang.String name, java.lang.String subscription, QueueControl queue, boolean topic, boolean durable, int daycountmax)
name
- destination namesubscription
- subscription namequeue
- internal queue objecttopic
- topic destination flagdurable
- durable subsciption flagdaycountmax
- max message history day countMethod Detail |
---|
public void onTimer()
public java.lang.String getDestinationName()
public java.lang.String getDestinationSubscription()
public boolean isDestinationTopic()
public boolean isDestinationDurable()
public long getCount()
public long getCountDelta()
public int getMessageCount()
public int getMessageCountDelta()
public long getLastUpdate()
public long getLastAddedMessageTime()
public void resetCounter()
public void resetHistory()
public java.util.List<MessageCounter.DayCounter> getHistory()
public java.lang.String getHistoryAsString()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |