org.activemq.store.cache
Class SimpleCachePersistenceAdapter

java.lang.Object
  extended by org.activemq.store.cache.CachePersistenceAdapter
      extended by org.activemq.store.cache.SimpleCachePersistenceAdapter
All Implemented Interfaces:
Service, PersistenceAdapter

public class SimpleCachePersistenceAdapter
extends CachePersistenceAdapter

Provides a CachePersistenceAdapter that uses a seperate LRU cache for each destination.

Version:
$Revision: 1.1.1.1 $

Constructor Summary
SimpleCachePersistenceAdapter()
           
SimpleCachePersistenceAdapter(PersistenceAdapter longTermPersistence)
           
 
Method Summary
protected  MessageCache createMessageCache(String destinationName)
          Subclasses should override this method to change the type of MessageCache that is used to cache messages.
 int getCacheSize()
           
 void setCacheSize(int cacheSize)
           
 
Methods inherited from class org.activemq.store.cache.CachePersistenceAdapter
beginTransaction, commitTransaction, createQueueMessageStore, createTopicMessageStore, createTransactionStore, deadLetterAlreadySent, getInitialDestinations, getLongTermPersistence, rollbackTransaction, setLongTermPersistence, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleCachePersistenceAdapter

public SimpleCachePersistenceAdapter()

SimpleCachePersistenceAdapter

public SimpleCachePersistenceAdapter(PersistenceAdapter longTermPersistence)
                              throws IOException
Throws:
IOException
Method Detail

createMessageCache

protected MessageCache createMessageCache(String destinationName)
Description copied from class: CachePersistenceAdapter
Subclasses should override this method to change the type of MessageCache that is used to cache messages.

Specified by:
createMessageCache in class CachePersistenceAdapter
Returns:
See Also:
CachePersistenceAdapter.createMessageCache(java.lang.String)

getCacheSize

public int getCacheSize()
Returns:
the MAX size that ech destination's LRU can grow to.

setCacheSize

public void setCacheSize(int cacheSize)
Parameters:
the - MAX size that ech destination's LRU can grow to.


Copyright © 2004-2010 Protique, Ltd.. All Rights Reserved.