|
|||||||||
| Home >> All >> org >> activemq >> store >> [ cache overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.activemq.store.cache
Class CachePersistenceAdapter

java.lang.Objectorg.activemq.store.cache.CachePersistenceAdapter
- All Implemented Interfaces:
- org.activemq.store.PersistenceAdapter, org.activemq.service.Service
- Direct Known Subclasses:
- MemoryBoundedCachePersistenceAdapter, SimpleCachePersistenceAdapter
- public abstract class CachePersistenceAdapter
- extends java.lang.Object
- implements org.activemq.store.PersistenceAdapter
- extends java.lang.Object
Implements a org.activemq.store.PersistenceAdapter designed to to speed up access to recently added messages by using a MessageCache .
- Version:
- $Revision: 1.1.1.1 $
| Field Summary | |
private org.activemq.store.PersistenceAdapter |
longTermPersistence
|
| Constructor Summary | |
CachePersistenceAdapter()
|
|
CachePersistenceAdapter(org.activemq.store.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(java.lang.String destinationName)
Subclasses should override this method to change the type of MessageCache that is used to cache messages. |
org.activemq.store.MessageStore |
createQueueMessageStore(java.lang.String destinationName)
Factory method to create a new queue message store with the given destination name |
org.activemq.store.TopicMessageStore |
createTopicMessageStore(java.lang.String destinationName)
Factory method to create a new topic message store with the given destination name |
org.activemq.store.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 |
java.util.Map |
getInitialDestinations()
Returns a map, indexed by String name, of all the javax.jms.Destination objects active on startup. |
org.activemq.store.PersistenceAdapter |
getLongTermPersistence()
|
void |
rollbackTransaction()
Rollback a persistence transaction |
void |
setLongTermPersistence(org.activemq.store.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 |
| Field Detail |
longTermPersistence
private org.activemq.store.PersistenceAdapter longTermPersistence
| Constructor Detail |
CachePersistenceAdapter
public CachePersistenceAdapter()
CachePersistenceAdapter
public CachePersistenceAdapter(org.activemq.store.PersistenceAdapter longTermPersistence) throws java.io.IOException
| Method Detail |
getInitialDestinations
public java.util.Map getInitialDestinations()
- Description copied from interface:
org.activemq.store.PersistenceAdapter - Returns a map, indexed by String name, of all the javax.jms.Destination
objects active on startup.
- Specified by:
getInitialDestinationsin interfaceorg.activemq.store.PersistenceAdapter
createQueueMessageStore
public org.activemq.store.MessageStore createQueueMessageStore(java.lang.String destinationName) throws javax.jms.JMSException
- Description copied from interface:
org.activemq.store.PersistenceAdapter - Factory method to create a new queue message store with the given destination name
- Specified by:
createQueueMessageStorein interfaceorg.activemq.store.PersistenceAdapter
createTopicMessageStore
public org.activemq.store.TopicMessageStore createTopicMessageStore(java.lang.String destinationName) throws javax.jms.JMSException
- Description copied from interface:
org.activemq.store.PersistenceAdapter - Factory method to create a new topic message store with the given destination name
- Specified by:
createTopicMessageStorein interfaceorg.activemq.store.PersistenceAdapter
createTransactionStore
public org.activemq.store.TransactionStore createTransactionStore() throws javax.jms.JMSException
- Description copied from interface:
org.activemq.store.PersistenceAdapter - Factory method to create a new persistent prepared transaction store for XA recovery
- Specified by:
createTransactionStorein interfaceorg.activemq.store.PersistenceAdapter
beginTransaction
public void beginTransaction()
throws javax.jms.JMSException
- Description copied from interface:
org.activemq.store.PersistenceAdapter - 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.
Typically one transaction will require one disk synchronization point and so for
real high performance its usually faster to perform many writes within the same
transaction to minimise latency caused by disk synchronization. This is especially
true when using tools like Berkeley Db or embedded JDBC servers.
- Specified by:
beginTransactionin interfaceorg.activemq.store.PersistenceAdapter
commitTransaction
public void commitTransaction()
throws javax.jms.JMSException
- Description copied from interface:
org.activemq.store.PersistenceAdapter - Commit a persistence transaction
- Specified by:
commitTransactionin interfaceorg.activemq.store.PersistenceAdapter
rollbackTransaction
public void rollbackTransaction()
- Description copied from interface:
org.activemq.store.PersistenceAdapter - Rollback a persistence transaction
- Specified by:
rollbackTransactionin interfaceorg.activemq.store.PersistenceAdapter
start
public void start()
throws javax.jms.JMSException
- Description copied from interface:
org.activemq.service.Service - Called to start the service
- Specified by:
startin interfaceorg.activemq.service.Service
stop
public void stop()
throws javax.jms.JMSException
- Description copied from interface:
org.activemq.service.Service - Called to shutdown the service
- Specified by:
stopin interfaceorg.activemq.service.Service
deadLetterAlreadySent
public boolean deadLetterAlreadySent(long seq,
boolean useLocking)
- Verifies if a dead letter has already been sent for a message
- Specified by:
deadLetterAlreadySentin interfaceorg.activemq.store.PersistenceAdapter
getLongTermPersistence
public org.activemq.store.PersistenceAdapter getLongTermPersistence()
setLongTermPersistence
public void setLongTermPersistence(org.activemq.store.PersistenceAdapter longTermPersistence)
createMessageCache
protected abstract MessageCache createMessageCache(java.lang.String destinationName)
- Subclasses should override this method to change the type
of MessageCache that is used to cache messages.
|
|||||||||
| Home >> All >> org >> activemq >> store >> [ cache overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.activemq.store.cache.CachePersistenceAdapter