public class MessageCounter extends Object
Modifier and Type | Class and Description |
---|---|
static class |
MessageCounter.DayCounter
Internal day counter class for one day hour based counter history
|
Constructor and Description |
---|
MessageCounter(String name,
String subscription,
Queue serverQueue,
boolean topic,
boolean durable,
int daycountmax)
Constructor
|
Modifier and Type | Method and Description |
---|---|
long |
getCount()
Gets the total message count since startup or
last counter reset
|
long |
getCountDelta()
Gets the message count delta since last method call
|
String |
getDestinationName() |
String |
getDestinationSubscription() |
List<MessageCounter.DayCounter> |
getHistory() |
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() |
long |
getMessageCount()
Gets the current message count of pending messages
within the destination waiting for dispatch
|
long |
getMessageCountDelta()
Gets the message count delta of pending messages
since last method call.
|
boolean |
isDestinationDurable() |
boolean |
isDestinationTopic() |
void |
onTimer() |
void |
resetCounter() |
void |
resetHistory() |
String |
toString() |
public MessageCounter(String name, String subscription, Queue serverQueue, boolean topic, boolean durable, int daycountmax)
name
- destination namesubscription
- subscription namequeue
- internal queue objecttopic
- topic destination flagdurable
- durable subsciption flagdaycountmax
- max message history day countpublic void onTimer()
public String getDestinationName()
public String getDestinationSubscription()
public boolean isDestinationTopic()
public boolean isDestinationDurable()
public long getCount()
public long getCountDelta()
public long getMessageCount()
public long getMessageCountDelta()
public long getLastUpdate()
public long getLastAddedMessageTime()
public void resetCounter()
public void resetHistory()
public List<MessageCounter.DayCounter> getHistory()
public String getHistoryAsString()
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.