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 SimpleMessageCache

    java.lang.Object
      org.codehaus.activemq.store.cache.SimpleMessageCache

All Implemented Interfaces:
  MessageCache

public class SimpleMessageCache
extends Object
implements MessageCache

A simple cache that stores messages in memory. Cache entries are evicted when they they get to old (A LRU cache is used).

Version:
  $Revision: 1.2 $

Constructor Summary
`SimpleMessageCache()`
`SimpleMessageCache(int cacheSize)`

Method Summary
`ActiveMQMessage` | `get(String msgid)` Gets a message that was previously `put` into this object.
`void` | `put(String messageID, ActiveMQMessage message)` Puts a message into the cache.
`void` | `remove(String messageID)` Remvoes a message from the cache.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SimpleMessageCache

    public SimpleMessageCache()

### SimpleMessageCache

    public SimpleMessageCache(int cacheSize)

Method Detail

### get

    public ActiveMQMessage get(String msgid)

  Gets a message that was previously `put` into this object.

  Specified by:
    `get` in interface `MessageCache`
  Parameters:
    `msgid` -
  Returns:
    null if the message was not previously put or if the message has expired out of the cache.

### put

    public void put(String messageID,
                    ActiveMQMessage message)

  Puts a message into the cache.

  Specified by:
    `put` in interface `MessageCache`
  Parameters:
    `messageID` -
    `message` -

### remove

    public void remove(String messageID)

  Remvoes a message from the cache.

  Specified by:
    `remove` in interface `MessageCache`
  Parameters:
    `messageID` -

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.