Class ReferenceHashMapCacheService
- java.lang.Object
-
- tech.rsqn.cacheservice.hashmapcache.ReferenceHashMapCacheService
-
- All Implemented Interfaces:
CacheService
public class ReferenceHashMapCacheService extends java.lang.Object implements CacheService
-
-
Constructor Summary
Constructors Constructor Description ReferenceHashMapCacheService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longclear()booleancontainsKey(java.lang.String key)<V> booleancontainsValue(V value)longcount()<V> Vget(java.lang.String key)voiditerateThroughKeys(CacheIteratorCallBack callBack)<V> voidput(java.lang.String key, V value)<V> voidputWithTTL(java.lang.String key, V value, long timeToLiveMillis)intremove(java.lang.String key)voidsetMaxSize(int maxSize)voidsetTrimTo(int trimTo)
-
-
-
Method Detail
-
setMaxSize
public void setMaxSize(int maxSize)
-
setTrimTo
public void setTrimTo(int trimTo)
-
containsValue
public <V> boolean containsValue(V value)
- Specified by:
containsValuein interfaceCacheService
-
put
public <V> void put(java.lang.String key, V value)- Specified by:
putin interfaceCacheService
-
putWithTTL
public <V> void putWithTTL(java.lang.String key, V value, long timeToLiveMillis)- Specified by:
putWithTTLin interfaceCacheService
-
get
public <V> V get(java.lang.String key)
- Specified by:
getin interfaceCacheService
-
remove
public int remove(java.lang.String key)
- Specified by:
removein interfaceCacheService
-
containsKey
public boolean containsKey(java.lang.String key)
- Specified by:
containsKeyin interfaceCacheService
-
iterateThroughKeys
public void iterateThroughKeys(CacheIteratorCallBack callBack)
- Specified by:
iterateThroughKeysin interfaceCacheService
-
count
public long count()
- Specified by:
countin interfaceCacheService
-
clear
public long clear()
- Specified by:
clearin interfaceCacheService
-
-