|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--jrun.jms.core.messagemgr.DestinationCache
|
+--jrun.jms.core.messagemgr.TopicDestinationCache
A DestinationCache for Topics. This cache extends DestinationCache but does not actually hold a reference to the messages. Instead it forwards them on to registered consumers.
We may need to build the cache for clients that fail over to the new server so we should maintain a cache of at least persistent messages handles. This is something that needs to be considered. As for non-persistent messages well that is the penalty for using them. If you want to ensure that you get every message, even during failover then you best publsih them using persistent delivery mode.
| Fields inherited from class jrun.jms.core.messagemgr.DestinationCache |
_consumers, _leaseHelper, _messages, m_persistentAdapter |
| Method Summary | |
JmsDestination |
getDestination()
Return a reference to the underlying destination |
int |
getMessageCount()
Return the number of messages currently active for this destination |
int |
hashCode()
|
boolean |
messageAdded(JmsDestination destination,
MessageImpl message)
This method is called when the #MessageManager adds a message
for this destination to the cache |
void |
messageRemoved(JmsDestination destination,
MessageImpl message)
This method is called when the {@l;ink #MessageManager} removes a message from the cache. |
boolean |
persistentMessageAdded(JmsDestination destination,
MessageImpl message)
This event is called when the MessageMgr adds a persistent
message to the cache. |
void |
persistentMessageRemoved(JmsDestination destination,
MessageImpl message)
This method is called when the {@l;ink #MessageManager} removes a persistent message from the cache. |
boolean |
registerConsumer(ConsumerEndpoint consumer)
Register a consumer with this cache. |
java.lang.String |
toString()
|
| Methods inherited from class jrun.jms.core.messagemgr.DestinationCache |
getConsumers, getDestinationByName, getId, getIdAsString, getLogger, getMaximumSize, onLeaseExpired, onSchedulableEvent, setCacheEvictionPolicy, setMaximumSize, shutdown, unregisterConsumer |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
public JmsDestination getDestination()
DestinationCachegetDestination in class DestinationCachejrun.jms.core.messagemgr.DestinationCache
public boolean messageAdded(JmsDestination destination,
MessageImpl message)
DestinationCache#MessageManager adds a message
for this destination to the cachemessageAdded in class DestinationCachejrun.jms.core.messagemgr.DestinationCachemessage - - message added to cache
public void messageRemoved(JmsDestination destination,
MessageImpl message)
DestinationCachemessageRemoved in class DestinationCachejrun.jms.core.messagemgr.DestinationCachemessage - - message removed from cache
public boolean persistentMessageAdded(JmsDestination destination,
MessageImpl message)
throws PersistenceException
MessageManagerEventListenerMessageMgr adds a persistent
message to the cache.jrun.jms.core.messagemgr.MessageManagerEventListenerdestination - - the message's destinationmessage - - message added to cachePersistenceException - - if there is a persistence related problem
public void persistentMessageRemoved(JmsDestination destination,
MessageImpl message)
throws PersistenceException
DestinationCachepersistentMessageRemoved in class DestinationCachejrun.jms.core.messagemgr.DestinationCachemessage - - message removed from cachepublic boolean registerConsumer(ConsumerEndpoint consumer)
DestinationCache#ConsumerEndpoint with an initial list of
messages that it needs to consume and then feed messages to it through
the specified listener object.
Messages are subsequently passed down to the consumer's through the listener, as they enter the DestinationCache.
registerConsumer in class DestinationCachejrun.jms.core.messagemgr.DestinationCacheconsumer - - message consumer for this destinationpublic int getMessageCount()
DestinationCachegetMessageCount in class DestinationCachejrun.jms.core.messagemgr.DestinationCachepublic java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||