org.jboss.messaging.core.server.impl
Class LastValueQueue
java.lang.Object
org.jboss.messaging.core.server.impl.QueueImpl
org.jboss.messaging.core.server.impl.LastValueQueue
- All Implemented Interfaces:
- Bindable, Queue
public class LastValueQueue
- extends QueueImpl
A queue that will discard messages if a newer message with the same MessageImpl.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
- Author:
- Andy Taylor
Methods inherited from class org.jboss.messaging.core.server.impl.QueueImpl |
acknowledge, activate, activateNow, addConsumer, addFirst, addLast, addRedistributor, cancel, cancelRedistributor, changeReferencePriority, checkDLQ, consumerFailedOver, deleteAllReferences, deleteMatchingReferences, deleteReference, deliverAsync, deliverNow, equals, expire, expireReference, expireReferences, expireReferences, getConsumerCount, getConsumers, getDeliveringCount, getDistributionPolicy, getFilter, getMessageCount, getMessagesAdded, getName, getPersistenceID, getReference, getRoutingName, getScheduledCount, getScheduledMessages, getUniqueName, hashCode, isBackup, isDurable, isExclusive, isTemporary, iterator, list, lockDelivery, moveReference, moveReferences, preroute, reacknowledge, referenceHandled, removeConsumer, removeFirstReference, removeReferenceWithID, sendMessageToDeadLetterAddress, setBackup, setDistributionPolicy, setPersistenceID, toString, unlockDelivery |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
LastValueQueue
public LastValueQueue(long persistenceID,
SimpleString address,
SimpleString name,
Filter filter,
boolean durable,
boolean temporary,
java.util.concurrent.ScheduledExecutorService scheduledExecutor,
PostOffice postOffice,
StorageManager storageManager,
HierarchicalRepository<AddressSettings> addressSettingsRepository)
route
public void route(ServerMessage message,
Transaction tx)
throws java.lang.Exception
- Specified by:
route
in interface Bindable
- Overrides:
route
in class QueueImpl
- Throws:
java.lang.Exception
reroute
public MessageReference reroute(ServerMessage message,
Transaction tx)
throws java.lang.Exception
- Specified by:
reroute
in interface Queue
- Overrides:
reroute
in class QueueImpl
- Throws:
java.lang.Exception
acknowledge
public void acknowledge(MessageReference ref)
throws java.lang.Exception
- Specified by:
acknowledge
in interface Queue
- Overrides:
acknowledge
in class QueueImpl
- Throws:
java.lang.Exception
cancel
public void cancel(Transaction tx,
MessageReference ref)
throws java.lang.Exception
- Specified by:
cancel
in interface Queue
- Overrides:
cancel
in class QueueImpl
- Throws:
java.lang.Exception
Copyright © 2006 JBoss Inc. All Rights Reserved.