org.apache.avalon.excalibur.cache.store
Class MemoryStore

java.lang.Object
  |
  +--org.apache.avalon.excalibur.cache.store.AbstractCacheStore
        |
        +--org.apache.avalon.excalibur.cache.store.MemoryStore
All Implemented Interfaces:
CacheStore

public class MemoryStore
extends AbstractCacheStore

Author:
Eung-ju Park

Constructor Summary
MemoryStore(int capacity)
           
 
Method Summary
 int capacity()
          Return capacity of store.
 boolean containsKey(java.lang.Object key)
           
 java.lang.Object get(java.lang.Object key)
           
 java.lang.Object[] keys()
          Return the array containing all key.
 java.lang.Object put(java.lang.Object key, java.lang.Object value)
           
 java.lang.Object remove(java.lang.Object key)
           
 int size()
          Return size of store.
 
Methods inherited from class org.apache.avalon.excalibur.cache.store.AbstractCacheStore
isFull
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MemoryStore

public MemoryStore(int capacity)
Method Detail

capacity

public int capacity()
Description copied from interface: CacheStore
Return capacity of store.
Following copied from interface: org.apache.avalon.excalibur.cache.CacheStore
Returns:
capacity of store

size

public int size()
Description copied from interface: CacheStore
Return size of store.
Following copied from interface: org.apache.avalon.excalibur.cache.CacheStore
Returns:
the number of key-value mappings in this store.

put

public java.lang.Object put(java.lang.Object key,
                            java.lang.Object value)
Following copied from interface: org.apache.avalon.excalibur.cache.CacheStore
Parameters:
key - not null
value - may be null

get

public java.lang.Object get(java.lang.Object key)

remove

public java.lang.Object remove(java.lang.Object key)

containsKey

public boolean containsKey(java.lang.Object key)

keys

public java.lang.Object[] keys()
Description copied from interface: CacheStore
Return the array containing all key.


Copyright © 2001 Apache Jakarta Project. All Rights Reserved.