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, sendToDLQ, setMaxAuditDepth, setMaxProducersToAudit, setPending, setPendingBatchSize, 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, isBrowser, isSlave, isSlowConsumer, matches, matches, removeDestination, setCursorMemoryHighWaterMark, setObjectName, setPrefetchSize, setSelector, setSlowConsumer, unmatched |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
QueueSubscription
public QueueSubscription(Broker broker,
SystemUsage usageManager,
ConnectionContext context,
ConsumerInfo info)
throws javax.jms.InvalidSelectorException
- Throws:
javax.jms.InvalidSelectorException
acknowledge
protected void acknowledge(ConnectionContext context,
MessageAck ack,
MessageReference n)
throws java.io.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:
java.io.IOException
canDispatch
protected boolean canDispatch(MessageReference n)
throws java.io.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:
java.io.IOException
assignGroupToMe
protected void assignGroupToMe(MessageGroupMap messageGroupOwners,
MessageReference n,
java.lang.String groupId)
throws java.io.IOException
- Assigns the message group to this subscription and set the flag on the
message that it is the first message to be dispatched.
- Throws:
java.io.IOException
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.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-2012. All Rights Reserved.