SimpleCachePersistenceAdapter (ActiveMQ 1.1 API)
Keywords: org.codehaus.activemq.store.cache.SimpleCachePersistenceAdapter class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.activemq.store.cache
Class SimpleCachePersistenceAdapter

    java.lang.Object
      org.codehaus.activemq.service.impl.PersistenceAdapterSupport
          org.codehaus.activemq.store.cache.CachePersistenceAdapter
              org.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 $

Field Summary
`(package private) int` | `cacheSize`

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`

Field Detail

### cacheSize

    int cacheSize

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)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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