public class LastValueQueue extends QueueImpl
Message.HDR_LAST_VALUE_NAME
property value. In other words it only retains the last
value
This is useful for example, for stock prices, where you're only interested in the latest value for a particular stock
QueueImpl.ConsumerHolder<T extends Consumer>
Modifier and Type | Field and Description |
---|---|
protected LinkedList<MessageReference> |
nextDeliveries |
CHECK_QUEUE_SIZE_PERIOD, CRITICAL_CHECK_DEPAGE, CRITICAL_CONSUMER, CRITICAL_DELIVER, CRITICAL_PATH_ADD_HEAD, CRITICAL_PATH_ADD_TAIL, CRITICAL_PATHS, DEFAULT_FLUSH_LIMIT, DELIVERY_TIMEOUT, dispatching, dispatchStartTime, MAX_DELIVERIES_IN_LOOP, NUM_PRIORITIES, pageSubscription, pendingMetrics, REDISTRIBUTOR_BATCH_SIZE, scheduledDeliveryHandler
MAX_CONSUMERS_UNLIMITED
Constructor and Description |
---|
LastValueQueue(long persistenceID,
SimpleString address,
SimpleString name,
Filter filter,
PagingStore pagingStore,
PageSubscription pageSubscription,
SimpleString user,
boolean durable,
boolean temporary,
boolean autoCreated,
RoutingType routingType,
Integer maxConsumers,
Boolean exclusive,
Boolean groupRebalance,
Integer groupBuckets,
SimpleString groupFirstKey,
Integer consumersBeforeDispatch,
Long delayBeforeDispatch,
Boolean purgeOnNoConsumers,
SimpleString lastValueKey,
Boolean nonDestructive,
Boolean autoDelete,
Long autoDeleteDelay,
Long autoDeleteMessageCount,
boolean configurationManaged,
ScheduledExecutorService scheduledExecutor,
PostOffice postOffice,
StorageManager storageManager,
HierarchicalRepository<AddressSettings> addressSettingsRepository,
ArtemisExecutor executor,
ActiveMQServer server,
QueueFactory factory)
Deprecated.
|
LastValueQueue(QueueConfiguration queueConfiguration,
PagingStore pagingStore,
PageSubscription pageSubscription,
ScheduledExecutorService scheduledExecutor,
PostOffice postOffice,
StorageManager storageManager,
HierarchicalRepository<AddressSettings> addressSettingsRepository,
ArtemisExecutor executor,
ActiveMQServer server,
QueueFactory factory) |
Modifier and Type | Method and Description |
---|---|
void |
acknowledge(MessageReference ref,
AckReason reason,
ServerConsumer consumer) |
void |
acknowledge(Transaction tx,
MessageReference ref,
AckReason reason,
ServerConsumer consumer) |
void |
addHead(MessageReference ref,
boolean scheduling) |
void |
addTail(MessageReference ref,
boolean direct) |
boolean |
allowsReferenceCallback()
the current queue and consumer settings will allow use of the Reference Execution and callback.
|
boolean |
equals(Object obj) |
SimpleString |
getLastValueKey() |
Set<SimpleString> |
getLastValueKeys() |
long |
getMessageCount() |
QueueConfiguration |
getQueueConfiguration() |
int |
hashCode() |
boolean |
isLastValue() |
protected MessageReference |
nextDelivery() |
void |
postAcknowledge(MessageReference ref,
AckReason reason) |
protected void |
refRemoved(MessageReference ref) |
void |
reload(MessageReference ref) |
protected void |
repeatNextDelivery(MessageReference reference) |
acknowledge, acknowledge, acknowledge, addConsumer, addHead, addLingerSession, addRedistributor, addRefSize, addSorted, addSorted, addTail, browserIterator, cancel, cancel, cancel, cancelRedistributor, changeReferencePriority, changeReferencesPriority, checkRedelivery, close, debug, decDelivering, deleteAllReferences, deleteAllReferences, deleteMatchingReferences, deleteMatchingReferences, deleteQueue, deleteQueue, deleteReference, deliverAsync, deliverNow, deliverScheduledMessages, destroyPaging, durableDown, durableUp, errorProcessing, expire, expire, expireReference, expireReferences, expireReferences, finalize, flushExecutor, forceDelivery, getAcknowledgeAttempts, getAddress, getAutoDeleteDelay, getAutoDeleteMessageCount, getConsumerCount, getConsumerRemovedTimestamp, getConsumers, getConsumersBeforeDispatch, getConsumersRefCount, getDelayBeforeDispatch, getDeliveringCount, getDeliveringMessages, getDeliveringSize, getDispatchStartTime, getDurableDeliveringCount, getDurableDeliveringSize, getDurableMessageCount, getDurablePersistentSize, getDurableScheduledCount, getDurableScheduledSize, getExecutor, getExpiryAddress, getFilter, getGroupBuckets, getGroupCount, getGroupFirstKey, getGroups, getID, getMaxConsumers, getMessageCountForRing, getMessagesAcknowledged, getMessagesAdded, getMessagesExpired, getMessagesKilled, getMessagesReplaced, getName, getNumberOfReferences, getPageSubscription, getPagingStore, getPersistentSize, getRate, getReference, getRingSize, getRoutingName, getRoutingType, getScheduledCount, getScheduledMessages, getScheduledSize, getUniqueName, getUser, groupMap, hasMatchingConsumer, incrementMesssagesAdded, isAutoCreated, isAutoDelete, isConfigurationManaged, isDirectDeliver, isDispatching, isDurable, isDurableMessage, isEnabled, isExclusive, isExpirationRedundant, isGroupRebalance, isGroupRebalancePauseDispatch, isInternalQueue, isMirrorController, isNonDestructive, isPaused, isPersistedPause, isPurgeOnNoConsumers, isTemporary, iterator, moveReference, moveReferences, moveReferences, moveReferencesBetweenSnFQueues, pause, pause, reacknowledge, recheckRefCount, refAdded, refDown, referenceHandled, refUp, reloadPause, removeAddress, removeConsumer, removeLingerSession, removeMessageReference, removeReferenceWithID, removeWithSuppliedID, rerouteMessages, resetAllGroups, resetAllIterators, resetGroup, resetMessagesAcknowledged, resetMessagesAdded, resetMessagesExpired, resetMessagesKilled, resume, retryMessages, retryMessages, route, routeWithAck, scheduleIfPossible, sendMessagesToDeadLetterAddress, sendMessageToDeadLetterAddress, sendToDeadLetterAddress, setConfigurationManaged, setConsumersBeforeDispatch, setConsumersRefCount, setDelayBeforeDispatch, setDispatching, setEnabled, setExclusive, setFilter, setGroupBuckets, setGroupFirstKey, setGroupRebalance, setGroupRebalancePauseDispatch, setInternalQueue, setMaxConsumer, setMirrorController, setNonDestructive, setPurgeOnNoConsumers, setRingSize, setRoutingType, setUser, toString, unproposed
checkExpiration, enterCritical, getCriticalAnalyzer, leaveCritical
deleteMatchingReferences
checkExpiration, enterCritical, getCriticalAnalyzer, leaveCritical
protected final LinkedList<MessageReference> nextDeliveries
@Deprecated public LastValueQueue(long persistenceID, SimpleString address, SimpleString name, Filter filter, PagingStore pagingStore, PageSubscription pageSubscription, SimpleString user, boolean durable, boolean temporary, boolean autoCreated, RoutingType routingType, Integer maxConsumers, Boolean exclusive, Boolean groupRebalance, Integer groupBuckets, SimpleString groupFirstKey, Integer consumersBeforeDispatch, Long delayBeforeDispatch, Boolean purgeOnNoConsumers, SimpleString lastValueKey, Boolean nonDestructive, Boolean autoDelete, Long autoDeleteDelay, Long autoDeleteMessageCount, boolean configurationManaged, ScheduledExecutorService scheduledExecutor, PostOffice postOffice, StorageManager storageManager, HierarchicalRepository<AddressSettings> addressSettingsRepository, ArtemisExecutor executor, ActiveMQServer server, QueueFactory factory)
public LastValueQueue(QueueConfiguration queueConfiguration, PagingStore pagingStore, PageSubscription pageSubscription, ScheduledExecutorService scheduledExecutor, PostOffice postOffice, StorageManager storageManager, HierarchicalRepository<AddressSettings> addressSettingsRepository, ArtemisExecutor executor, ActiveMQServer server, QueueFactory factory)
protected MessageReference nextDelivery()
nextDelivery
in class QueueImpl
protected void repeatNextDelivery(MessageReference reference)
repeatNextDelivery
in class QueueImpl
public void addTail(MessageReference ref, boolean direct)
public long getMessageCount()
getMessageCount
in interface Queue
getMessageCount
in class QueueImpl
public void addHead(MessageReference ref, boolean scheduling)
public void postAcknowledge(MessageReference ref, AckReason reason)
postAcknowledge
in interface Queue
postAcknowledge
in class QueueImpl
public boolean allowsReferenceCallback()
Queue
allowsReferenceCallback
in interface Queue
allowsReferenceCallback
in class QueueImpl
public QueueConfiguration getQueueConfiguration()
getQueueConfiguration
in interface Queue
getQueueConfiguration
in class QueueImpl
protected void refRemoved(MessageReference ref)
refRemoved
in class QueueImpl
public void acknowledge(MessageReference ref, AckReason reason, ServerConsumer consumer) throws Exception
acknowledge
in interface Queue
acknowledge
in class QueueImpl
Exception
public void acknowledge(Transaction tx, MessageReference ref, AckReason reason, ServerConsumer consumer) throws Exception
acknowledge
in interface Queue
acknowledge
in class QueueImpl
Exception
public void reload(MessageReference ref)
public boolean isLastValue()
isLastValue
in interface Queue
isLastValue
in class QueueImpl
public SimpleString getLastValueKey()
getLastValueKey
in interface Queue
getLastValueKey
in class QueueImpl
public Set<SimpleString> getLastValueKeys()
Copyright © 2021 JBoss by Red Hat. All rights reserved.