|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.activemq.broker.region.AbstractSubscription
org.apache.activemq.broker.region.TopicSubscription
public class TopicSubscription
Field Summary | |
---|---|
protected AtomicLong |
dispatchedCounter
|
protected PendingMessageCursor |
matched
|
protected SystemUsage |
usageManager
|
Fields inherited from class org.apache.activemq.broker.region.AbstractSubscription |
---|
broker, context, destinationFilter, destinations, info |
Constructor Summary | |
---|---|
TopicSubscription(Broker broker,
ConnectionContext context,
ConsumerInfo info,
SystemUsage usageManager)
|
Method Summary | |
---|---|
void |
acknowledge(ConnectionContext context,
MessageAck ack)
Used when client acknowledge receipt of dispatched message. |
void |
add(MessageReference node)
Used to add messages that match the subscription. |
void |
destroy()
Called when the subscription is destroyed. |
int |
discarded()
|
long |
getDequeueCounter()
|
long |
getDispatchedCounter()
|
int |
getDispatchedQueueSize()
|
long |
getEnqueueCounter()
|
int |
getInFlightSize()
|
PendingMessageCursor |
getMatched()
|
int |
getMaximumPendingMessages()
|
int |
getMemoryUsageHighWaterMark()
|
MessageEvictionStrategy |
getMessageEvictionStrategy()
|
int |
getPendingQueueSize()
|
int |
getPrefetchSize()
|
SystemUsage |
getUsageManager()
|
void |
init()
|
boolean |
isFull()
|
boolean |
isHighWaterMark()
|
boolean |
isLowWaterMark()
|
int |
matched()
|
void |
processMessageDispatchNotification(MessageDispatchNotification mdn)
Used by a Slave Broker to update dispatch infomation |
Response |
pullMessage(ConnectionContext context,
MessagePull pull)
Allows a consumer to pull a message on demand |
protected void |
removeExpiredMessages()
Discard any expired messages from the matched list. |
void |
setMatched(PendingMessageCursor matched)
|
void |
setMaximumPendingMessages(int maximumPendingMessages)
Sets the maximum number of pending messages that can be matched against this consumer before old messages are discarded. |
void |
setMemoryUsageHighWaterMark(int memoryUsageHighWaterMark)
|
void |
setMessageEvictionStrategy(MessageEvictionStrategy messageEvictionStrategy)
Sets the eviction strategy used to decide which message to evict when the slow consumer needs to discard messages |
String |
toString()
|
void |
updateConsumerPrefetch(int newPrefetch)
inform the MessageConsumer on the client to change it's prefetch |
Methods inherited from class org.apache.activemq.broker.region.AbstractSubscription |
---|
add, addDestination, addRecoveredMessage, countBeforeFull, doAddRecoveredMessage, gc, getActiveMQDestination, getConsumerInfo, getContext, getCursorMemoryHighWaterMark, getInFlightUsage, getInfo, getObjectName, getSelector, getSelectorExpression, isBrowser, isRecoveryRequired, isSlave, matches, matches, remove, removeDestination, setCursorMemoryHighWaterMark, setObjectName, setPrefetchSize, setSelector |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected PendingMessageCursor matched
protected final SystemUsage usageManager
protected AtomicLong dispatchedCounter
Constructor Detail |
---|
public TopicSubscription(Broker broker, ConnectionContext context, ConsumerInfo info, SystemUsage usageManager) throws Exception
Exception
Method Detail |
---|
public void init() throws Exception
Exception
public void add(MessageReference node) throws Exception
Subscription
Exception
InterruptedException
IOException
protected void removeExpiredMessages() throws IOException
IOException
public void processMessageDispatchNotification(MessageDispatchNotification mdn)
Subscription
public void acknowledge(ConnectionContext context, MessageAck ack) throws Exception
Subscription
IOException
Exception
public Response pullMessage(ConnectionContext context, MessagePull pull) throws Exception
Subscription
Exception
public int getPendingQueueSize()
public int getDispatchedQueueSize()
public int getMaximumPendingMessages()
public long getDispatchedCounter()
public long getEnqueueCounter()
public long getDequeueCounter()
public int discarded()
public int matched()
public void setMaximumPendingMessages(int maximumPendingMessages)
public MessageEvictionStrategy getMessageEvictionStrategy()
public void setMessageEvictionStrategy(MessageEvictionStrategy messageEvictionStrategy)
public boolean isFull()
public int getInFlightSize()
public boolean isLowWaterMark()
public boolean isHighWaterMark()
public void setMemoryUsageHighWaterMark(int memoryUsageHighWaterMark)
memoryUsageHighWaterMark
- the memoryUsageHighWaterMark to setpublic int getMemoryUsageHighWaterMark()
public SystemUsage getUsageManager()
public PendingMessageCursor getMatched()
public void setMatched(PendingMessageCursor matched)
matched
- the matched to setpublic void updateConsumerPrefetch(int newPrefetch)
newPrefetch
- public String toString()
toString
in class Object
public void destroy()
Subscription
public int getPrefetchSize()
getPrefetchSize
in interface Subscription
getPrefetchSize
in class AbstractSubscription
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |