|
||||||||||
| 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.PrefetchSubscription
org.apache.activemq.broker.region.DurableTopicSubscription
public class DurableTopicSubscription
| Field Summary |
|---|
| Fields inherited from class org.apache.activemq.broker.region.PrefetchSubscription |
|---|
dequeueCounter, dispatchCounter, dispatched, dispatchLock, enqueueCounter, pending, pendingLock, prefetchExtension, scheduler, usageManager, usePrefetchExtension |
| Fields inherited from class org.apache.activemq.broker.region.AbstractSubscription |
|---|
broker, context, destinationFilter, destinations, info |
| Constructor Summary | |
|---|---|
DurableTopicSubscription(Broker broker,
SystemUsage usageManager,
ConnectionContext context,
ConsumerInfo info,
boolean keepDurableSubsActive)
|
|
| Method Summary | |
|---|---|
protected void |
acknowledge(ConnectionContext context,
MessageAck ack,
MessageReference node)
Used during acknowledgment to remove the message. |
void |
activate(SystemUsage memoryManager,
ConnectionContext context,
ConsumerInfo info,
RegionBroker regionBroker)
|
void |
add(ConnectionContext context,
Destination destination)
The subscription will be receiving messages from the destination. |
void |
add(MessageReference node)
Used to add messages that match the subscription. |
protected boolean |
canDispatch(MessageReference node)
Use when a matched message is about to be dispatched to the client. |
protected MessageDispatch |
createMessageDispatch(MessageReference node,
Message message)
|
void |
deactivate(boolean keepDurableSubsActive)
|
void |
destroy()
Release any references that we are holding. |
protected void |
dispatchPending()
|
protected void |
doAddRecoveredMessage(MessageReference message)
|
void |
gc()
The subscription should release as may references as it can to help the garbage collector reclaim memory. |
long |
getOfflineTimestamp()
|
int |
getPendingQueueSize()
|
SubscriptionKey |
getSubscriptionKey()
|
boolean |
isActive()
|
protected boolean |
isDropped(MessageReference node)
|
boolean |
isFull()
Used to determine if the broker can dispatch to the consumer. |
boolean |
isKeepDurableSubsActive()
|
void |
onUsageChanged(Usage usage,
int oldPercentUsage,
int newPercentUsage)
|
void |
removePending(MessageReference node)
|
void |
setOfflineTimestamp(long timestamp)
|
protected void |
setPendingBatchSize(PendingMessageCursor pending,
int numberToDispatch)
|
void |
setSelector(String selector)
Attempts to change the current active selector on the subscription. |
String |
toString()
|
void |
unmatched(MessageReference node)
store will have a pending ack for all durables, irrespective of the selector so we need to ack if node is un-matched |
| Methods inherited from class org.apache.activemq.broker.region.AbstractSubscription |
|---|
addDestination, addRecoveredMessage, getActiveMQDestination, getConsumerInfo, getContext, getCursorMemoryHighWaterMark, getInFlightUsage, getInfo, getObjectName, getPrefetchSize, getSelector, getSelectorExpression, getTimeOfLastMessageAck, isBrowser, isSlowConsumer, matches, matches, removeDestination, setCursorMemoryHighWaterMark, setObjectName, setSlowConsumer, setTimeOfLastMessageAck |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DurableTopicSubscription(Broker broker,
SystemUsage usageManager,
ConnectionContext context,
ConsumerInfo info,
boolean keepDurableSubsActive)
throws javax.jms.JMSException
javax.jms.JMSException| Method Detail |
|---|
public final boolean isActive()
public final long getOfflineTimestamp()
public void setOfflineTimestamp(long timestamp)
public boolean isFull()
PrefetchSubscription
isFull in interface SubscriptionisFull in class PrefetchSubscriptionpublic void gc()
Subscription
gc in interface Subscriptiongc in class AbstractSubscription
public void unmatched(MessageReference node)
throws IOException
unmatched in interface Subscriptionunmatched in class AbstractSubscriptionIOException
protected void setPendingBatchSize(PendingMessageCursor pending,
int numberToDispatch)
setPendingBatchSize in class PrefetchSubscription
public void add(ConnectionContext context,
Destination destination)
throws Exception
Subscription
add in interface Subscriptionadd in class PrefetchSubscriptionException
public void activate(SystemUsage memoryManager,
ConnectionContext context,
ConsumerInfo info,
RegionBroker regionBroker)
throws Exception
Exception
public void deactivate(boolean keepDurableSubsActive)
throws Exception
Exception
protected MessageDispatch createMessageDispatch(MessageReference node,
Message message)
createMessageDispatch in class PrefetchSubscription
public void add(MessageReference node)
throws Exception
Subscription
add in interface Subscriptionadd in class PrefetchSubscriptionException
InterruptedException
IOException
protected void dispatchPending()
throws IOException
dispatchPending in class PrefetchSubscriptionIOException
public void removePending(MessageReference node)
throws IOException
IOException
protected void doAddRecoveredMessage(MessageReference message)
throws Exception
doAddRecoveredMessage in class AbstractSubscriptionExceptionpublic int getPendingQueueSize()
getPendingQueueSize in interface SubscriptiongetPendingQueueSize in class PrefetchSubscription
public void setSelector(String selector)
throws javax.jms.InvalidSelectorException
Subscription
setSelector in interface SubscriptionsetSelector in class AbstractSubscriptionjavax.jms.InvalidSelectorExceptionprotected boolean canDispatch(MessageReference node)
PrefetchSubscription
canDispatch in class PrefetchSubscription
protected void acknowledge(ConnectionContext context,
MessageAck ack,
MessageReference node)
throws IOException
PrefetchSubscription
acknowledge in class PrefetchSubscriptionIOExceptionpublic String toString()
toString in class Objectpublic SubscriptionKey getSubscriptionKey()
public void destroy()
destroy in interface Subscription
public void onUsageChanged(Usage usage,
int oldPercentUsage,
int newPercentUsage)
onUsageChanged in interface UsageListenerprotected boolean isDropped(MessageReference node)
isDropped in class PrefetchSubscriptionpublic boolean isKeepDurableSubsActive()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||