|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.dict4j.cache.MemoryCacheProvider
public class MemoryCacheProvider
Constructor Summary | |
---|---|
MemoryCacheProvider(long expirationInSeconds)
|
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 |
java.util.ArrayList<CacheKey> |
getExpiredKeys()
|
long |
getHitsNumber()
|
void |
invalidateCache()
Check all cache entries and remove expired ones |
void |
remove(CacheKey key)
Remove object from cache by key |
void |
setExpirationInSeconds(long expirationInSeconds)
|
int |
size()
Get number of entities in cache |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MemoryCacheProvider(long expirationInSeconds)
Method Detail |
---|
public void add(CacheKey key, java.lang.Object value)
add
in interface CacheProvider
key
- cache keyvalue
- objectpublic java.lang.Object get(CacheKey key)
get
in interface CacheProvider
key
- cache key
public void remove(CacheKey key)
remove
in interface CacheProvider
key
- cache keypublic void invalidateCache()
invalidateCache
in interface CacheProvider
public java.util.ArrayList<CacheKey> getExpiredKeys()
public int size()
size
in interface CacheProvider
public void clear()
clear
in interface CacheProvider
public void setExpirationInSeconds(long expirationInSeconds)
public long getHitsNumber()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |