org.codehaus.activemq.store.cache
Class SimpleCachePersistenceAdapter

java.lang.Object
  extended byorg.codehaus.activemq.service.impl.PersistenceAdapterSupport
      extended byorg.codehaus.activemq.store.cache.CachePersistenceAdapter
          extended byorg.codehaus.activemq.store.cache.SimpleCachePersistenceAdapter
All Implemented Interfaces:
PersistenceAdapter, Service

public class SimpleCachePersistenceAdapter
extends CachePersistenceAdapter

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

Version:
$Revision: 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.codehaus.activemq.store.cache.CachePersistenceAdapter
beginTransaction, commitTransaction, createPreparedTransactionStore, createQueueMessageStore, createTopicMessageStore, getInitialDestinations, getLongTermPersistence, rollbackTransaction, setLongTermPersistence, start, stop
 
Methods inherited from class org.codehaus.activemq.service.impl.PersistenceAdapterSupport
createQueueMessageContainer, createTopicMessageContainer
 
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
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
Parameters:
destinationName -
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)


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