|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.activemq.store.cache.CachePersistenceAdapter
public abstract class CachePersistenceAdapter
Implements a PersistenceAdapter designed to
to speed up access to recently added messages by using
a MessageCache .
| Constructor Summary | |
|---|---|
CachePersistenceAdapter()
|
|
CachePersistenceAdapter(PersistenceAdapter longTermPersistence)
|
|
| Method Summary | |
|---|---|
void |
beginTransaction()
This method starts a transaction on the persistent storage - which is nothing to do with JMS or XA transactions - its purely a mechanism to perform multiple writes to a persistent store in 1 transaction as a performance optimisation. |
void |
commitTransaction()
Commit a persistence transaction |
protected abstract MessageCache |
createMessageCache(String destinationName)
Subclasses should override this method to change the type of MessageCache that is used to cache messages. |
MessageStore |
createQueueMessageStore(String destinationName)
Factory method to create a new queue message store with the given destination name |
TopicMessageStore |
createTopicMessageStore(String destinationName)
Factory method to create a new topic message store with the given destination name |
TransactionStore |
createTransactionStore()
Factory method to create a new persistent prepared transaction store for XA recovery |
boolean |
deadLetterAlreadySent(long seq,
boolean useLocking)
Verifies if a dead letter has already been sent for a message |
Map |
getInitialDestinations()
Returns a map, indexed by String name, of all the Destination
objects active on startup. |
PersistenceAdapter |
getLongTermPersistence()
|
void |
rollbackTransaction()
Rollback a persistence transaction |
void |
setLongTermPersistence(PersistenceAdapter longTermPersistence)
|
void |
start()
Called to start the service |
void |
stop()
Called to shutdown the service |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CachePersistenceAdapter()
public CachePersistenceAdapter(PersistenceAdapter longTermPersistence)
throws IOException
IOException| Method Detail |
|---|
public Map getInitialDestinations()
PersistenceAdapterDestination
objects active on startup.
getInitialDestinations in interface PersistenceAdapter
public MessageStore createQueueMessageStore(String destinationName)
throws JMSException
PersistenceAdapter
createQueueMessageStore in interface PersistenceAdapterJMSException
public TopicMessageStore createTopicMessageStore(String destinationName)
throws JMSException
PersistenceAdapter
createTopicMessageStore in interface PersistenceAdapterJMSException
public TransactionStore createTransactionStore()
throws JMSException
PersistenceAdapter
createTransactionStore in interface PersistenceAdapterJMSException
public void beginTransaction()
throws JMSException
PersistenceAdapter
beginTransaction in interface PersistenceAdapterJMSException
public void commitTransaction()
throws JMSException
PersistenceAdapter
commitTransaction in interface PersistenceAdapterJMSExceptionPersistenceAdapter.beginTransaction()public void rollbackTransaction()
PersistenceAdapter
rollbackTransaction in interface PersistenceAdapterPersistenceAdapter.beginTransaction()
public void start()
throws JMSException
Service
start in interface ServiceJMSException
public void stop()
throws JMSException
Service
stop in interface ServiceJMSException
public boolean deadLetterAlreadySent(long seq,
boolean useLocking)
deadLetterAlreadySent in interface PersistenceAdapterseq - useLocking - to prevent concurrency/dups
public PersistenceAdapter getLongTermPersistence()
public void setLongTermPersistence(PersistenceAdapter longTermPersistence)
protected abstract MessageCache createMessageCache(String destinationName)
destinationName -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||