org.mmbase.cache
Interface CacheImplementationInterface

All Superinterfaces:
Map
All Known Implementing Classes:
LRUHashtable, OSCacheImplementation

public interface CacheImplementationInterface
extends Map

Classes which can be used as a cache implementation need to implement this interface. An implementation of this interface has to be thread-safe to guarantee correctness.

Since:
MMBase-1.8
Version:
$Id: CacheImplementationInterface.java,v 1.5 2006/02/23 17:36:55 michiel Exp $
Author:
Michiel Meeuwissen

Nested Class Summary
 
Nested classes inherited from class java.util.Map
Map.Entry
 
Method Summary
 void config(Map configuration)
          Configure the implementation with the given configuration values
 int getCount(Object key)
          Returns the hit-count on a certain key (if implementable).
 int maxSize()
          Gets the (maximal) size of the cache (if implementable)
 void setMaxSize(int size)
          Sets the (maximal) size of the cache (if implementable).
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Method Detail

setMaxSize

public void setMaxSize(int size)
Sets the (maximal) size of the cache (if implementable).


maxSize

public int maxSize()
Gets the (maximal) size of the cache (if implementable)


getCount

public int getCount(Object key)
Returns the hit-count on a certain key (if implementable).


config

public void config(Map configuration)
Configure the implementation with the given configuration values



MMBase build 1.8.1.20060716