|
||||||||||
| 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 |
|---|
audit, dequeueCounter, dispatchCounter, dispatched, enqueueCounter, pending, prefetchExtension, usageManager |
| Fields inherited from class org.apache.activemq.broker.region.AbstractSubscription |
|---|
broker, context, destinationFilter, 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)
|
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 |
doAddRecoveredMessage(MessageReference message)
|
void |
gc()
The subscription should release as may references as it can to help the garbage collector reclaim memory. |
int |
getPendingQueueSize()
|
SubscriptionKey |
getSubscriptionKey()
|
boolean |
isActive()
|
protected boolean |
isDropped(MessageReference node)
|
boolean |
isFull()
Used to determine if the broker can dispatch to the consumer. |
void |
onUsageChanged(Usage usage,
int oldPercentUsage,
int newPercentUsage)
|
void |
setSelector(String selector)
Attempts to change the current active selector on the subscription. |
String |
toString()
|
| Methods inherited from class org.apache.activemq.broker.region.PrefetchSubscription |
|---|
acknowledge, assertAckMatchesDispatched, countBeforeFull, dispatch, dispatchPending, getDequeueCounter, getDispatchedCounter, getDispatchedQueueSize, getEnqueueCounter, getInFlightSize, getMaxAuditDepth, getMaxProducersToAudit, getPending, isHighWaterMark, isLowWaterMark, isRecoveryRequired, onDispatch, processMessageDispatchNotification, pullMessage, remove, sendToDLQ, setMaxAuditDepth, setMaxProducersToAudit, setPending, updateConsumerPrefetch |
| Methods inherited from class org.apache.activemq.broker.region.AbstractSubscription |
|---|
addDestination, addRecoveredMessage, getActiveMQDestination, getConsumerInfo, getContext, getInFlightUsage, getInfo, getObjectName, getPrefetchSize, getSelector, getSelectorExpression, isBrowser, isSlave, matches, matches, removeDestination, setObjectName |
| 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 JMSException
JMSException| Method Detail |
|---|
public boolean isActive()
public boolean isFull()
PrefetchSubscription
isFull in interface SubscriptionisFull in class PrefetchSubscriptionpublic void gc()
Subscription
gc in interface Subscriptiongc in class AbstractSubscription
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)
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 doAddRecoveredMessage(MessageReference message)
throws Exception
doAddRecoveredMessage in class AbstractSubscriptionExceptionpublic int getPendingQueueSize()
getPendingQueueSize in interface SubscriptiongetPendingQueueSize in class PrefetchSubscription
public void setSelector(String selector)
throws InvalidSelectorException
Subscription
setSelector in interface SubscriptionsetSelector in class AbstractSubscriptionInvalidSelectorExceptionprotected 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 UsageListenerusageManager - oldPercentUsage - newPercentUsage - org.apache.activemq.usage.UsageListener#onMemoryUseChanged(org.apache.activemq.usage.SystemUsage,
int, int)protected boolean isDropped(MessageReference node)
isDropped in class PrefetchSubscription
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||