net.sf.dict4j.cache
Interface CacheProvider

All Known Implementing Classes:
MemoryCacheProvider

public interface CacheProvider


Method Summary
 void add(CacheKey key, java.lang.Object value)
          Add object to cache
 void clear()
          Clear cache
 java.lang.Object get(CacheKey key)
          Get cache object by key
 void invalidateCache()
          Check all cache entries and remove expired ones
 void remove(CacheKey key)
          Remove object from cache by key
 int size()
          Get number of entities in cache
 

Method Detail

add

void add(CacheKey key,
         java.lang.Object value)
Add object to cache

Parameters:
key - cache key
value - object

get

java.lang.Object get(CacheKey key)
Get cache object by key

Parameters:
key - cache key
Returns:
object

remove

void remove(CacheKey key)
Remove object from cache by key

Parameters:
key - cache key

invalidateCache

void invalidateCache()
Check all cache entries and remove expired ones


size

int size()
Get number of entities in cache

Returns:
number of entities in cache

clear

void clear()
Clear cache