org.apache.activemq.broker.region
Class QueueSubscription
java.lang.Object
org.apache.activemq.broker.region.AbstractSubscription
org.apache.activemq.broker.region.PrefetchSubscription
org.apache.activemq.broker.region.QueueSubscription
- All Implemented Interfaces:
- LockOwner, Subscription, SubscriptionRecovery
- Direct Known Subclasses:
- QueueBrowserSubscription
public class QueueSubscription
- extends PrefetchSubscription
- implements LockOwner
| Fields inherited from class org.apache.activemq.broker.region.PrefetchSubscription |
dequeueCounter, dispatchCounter, dispatched, dispatchLock, enqueueCounter, pending, pendingLock, prefetchExtension, scheduler, usageManager, usePrefetchExtension |
| Methods inherited from class org.apache.activemq.broker.region.PrefetchSubscription |
acknowledge, add, add, assertAckMatchesDispatched, countBeforeFull, createMessageDispatch, dispatch, dispatchPending, getDequeueCounter, getDispatchedCounter, getDispatchedQueueSize, getEnqueueCounter, getInFlightSize, getMaxAuditDepth, getMaxProducersToAudit, getPending, getPendingQueueSize, getPrefetchExtension, isFull, isHighWaterMark, isLowWaterMark, isRecoveryRequired, isUsePrefetchExtension, onDispatch, processMessageDispatchNotification, pullMessage, remove, remove, sendToDLQ, setMaxAuditDepth, setMaxProducersToAudit, setPending, setPendingBatchSize, setPrefetchSize, setUsePrefetchExtension, updateConsumerPrefetch |
| Methods inherited from class org.apache.activemq.broker.region.AbstractSubscription |
addDestination, addRecoveredMessage, doAddRecoveredMessage, gc, getActiveMQDestination, getConsumerInfo, getContext, getCursorMemoryHighWaterMark, getInFlightUsage, getInfo, getObjectName, getPrefetchSize, getSelector, getSelectorExpression, getTimeOfLastMessageAck, isBrowser, isSlowConsumer, matches, matches, removeDestination, setCursorMemoryHighWaterMark, setObjectName, setSelector, setSlowConsumer, setTimeOfLastMessageAck, unmatched |
QueueSubscription
public QueueSubscription(Broker broker,
SystemUsage usageManager,
ConnectionContext context,
ConsumerInfo info)
throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
acknowledge
protected void acknowledge(ConnectionContext context,
MessageAck ack,
MessageReference n)
throws IOException
- In the queue case, mark the node as dropped and then a gc cycle will
remove it from the queue.
- Specified by:
acknowledge in class PrefetchSubscription
- Throws:
IOException
canDispatch
protected boolean canDispatch(MessageReference n)
throws IOException
- Description copied from class:
PrefetchSubscription
- Use when a matched message is about to be dispatched to the client.
- Specified by:
canDispatch in class PrefetchSubscription
- Returns:
- false if the message should not be dispatched to the client
(another sub may have already dispatched it for example).
- Throws:
IOException
toString
public String toString()
- Overrides:
toString in class Object
getLockPriority
public int getLockPriority()
- Specified by:
getLockPriority in interface LockOwner
isLockExclusive
public boolean isLockExclusive()
- Specified by:
isLockExclusive in interface LockOwner
destroy
public void destroy()
- Description copied from interface:
Subscription
- Called when the subscription is destroyed.
- Specified by:
destroy in interface Subscription
isDropped
protected boolean isDropped(MessageReference node)
- Specified by:
isDropped in class PrefetchSubscription
Copyright © 2005-2013 The Apache Software Foundation. All Rights Reserved.