public class DurableTopicSubscription extends PrefetchSubscription implements UsageListener
dequeueCounter, dispatchCounter, dispatched, dispatchLock, enqueueCounter, pending, pendingLock, prefetchExtension, scheduler, usageManager, usePrefetchExtensionbroker, context, destinationFilter, destinations, info| Constructor and Description |
|---|
DurableTopicSubscription(Broker broker,
SystemUsage usageManager,
ConnectionContext context,
ConsumerInfo info,
boolean keepDurableSubsActive) |
| Modifier and Type | Method and Description |
|---|---|
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(java.lang.String selector)
Attempts to change the current active selector on the subscription.
|
java.lang.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
|
acknowledge, assertAckMatchesDispatched, countBeforeFull, dispatch, getDequeueCounter, getDispatchedCounter, getDispatchedQueueSize, getEnqueueCounter, getInFlightSize, getMaxAuditDepth, getMaxProducersToAudit, getPending, getPrefetchExtension, isHighWaterMark, isLowWaterMark, isRecoveryRequired, isUsePrefetchExtension, onDispatch, processMessageDispatchNotification, pullMessage, remove, sendToDLQ, setMaxAuditDepth, setMaxProducersToAudit, setPending, setPrefetchSize, setUsePrefetchExtension, updateConsumerPrefetchaddDestination, addRecoveredMessage, getActiveMQDestination, getConsumerInfo, getContext, getCursorMemoryHighWaterMark, getInFlightUsage, getInfo, getObjectName, getPrefetchSize, getSelector, getSelectorExpression, isBrowser, isSlowConsumer, matches, matches, removeDestination, setCursorMemoryHighWaterMark, setObjectName, setSlowConsumerpublic DurableTopicSubscription(Broker broker, SystemUsage usageManager, ConnectionContext context, ConsumerInfo info, boolean keepDurableSubsActive) throws javax.jms.JMSException
javax.jms.JMSExceptionpublic final boolean isActive()
public final long getOfflineTimestamp()
public void setOfflineTimestamp(long timestamp)
public boolean isFull()
PrefetchSubscriptionisFull in interface SubscriptionisFull in class PrefetchSubscriptionpublic void gc()
Subscriptiongc in interface Subscriptiongc in class AbstractSubscriptionpublic void unmatched(MessageReference node) throws java.io.IOException
unmatched in interface Subscriptionunmatched in class AbstractSubscriptionjava.io.IOExceptionprotected void setPendingBatchSize(PendingMessageCursor pending, int numberToDispatch)
setPendingBatchSize in class PrefetchSubscriptionpublic void add(ConnectionContext context, Destination destination) throws java.lang.Exception
Subscriptionadd in interface Subscriptionadd in class PrefetchSubscriptionjava.lang.Exceptionpublic void activate(SystemUsage memoryManager, ConnectionContext context, ConsumerInfo info, RegionBroker regionBroker) throws java.lang.Exception
java.lang.Exceptionpublic void deactivate(boolean keepDurableSubsActive)
throws java.lang.Exception
java.lang.Exceptionprotected MessageDispatch createMessageDispatch(MessageReference node, Message message)
createMessageDispatch in class PrefetchSubscriptionpublic void add(MessageReference node) throws java.lang.Exception
Subscriptionadd in interface Subscriptionadd in class PrefetchSubscriptionjava.lang.Exceptionjava.lang.InterruptedExceptionjava.io.IOExceptionprotected void dispatchPending()
throws java.io.IOException
dispatchPending in class PrefetchSubscriptionjava.io.IOExceptionpublic void removePending(MessageReference node) throws java.io.IOException
java.io.IOExceptionprotected void doAddRecoveredMessage(MessageReference message) throws java.lang.Exception
doAddRecoveredMessage in class AbstractSubscriptionjava.lang.Exceptionpublic int getPendingQueueSize()
getPendingQueueSize in interface SubscriptiongetPendingQueueSize in class PrefetchSubscriptionpublic void setSelector(java.lang.String selector)
throws javax.jms.InvalidSelectorException
SubscriptionsetSelector in interface SubscriptionsetSelector in class AbstractSubscriptionjavax.jms.InvalidSelectorExceptionprotected boolean canDispatch(MessageReference node)
PrefetchSubscriptioncanDispatch in class PrefetchSubscriptionprotected void acknowledge(ConnectionContext context, MessageAck ack, MessageReference node) throws java.io.IOException
PrefetchSubscriptionacknowledge in class PrefetchSubscriptionjava.io.IOExceptionpublic java.lang.String toString()
toString in class java.lang.Objectpublic SubscriptionKey getSubscriptionKey()
public void destroy()
destroy in interface Subscriptionpublic void onUsageChanged(Usage usage, int oldPercentUsage, int newPercentUsage)
onUsageChanged in interface UsageListenerprotected boolean isDropped(MessageReference node)
isDropped in class PrefetchSubscriptionpublic boolean isKeepDurableSubsActive()
Copyright © 2005-2013 Red Hat, Inc.. All Rights Reserved.