Package com.jackmeng.stl
Class stl_SimpleCache<K,V>
java.lang.Object
com.jackmeng.stl.stl_SimpleCache<K,V>
public class stl_SimpleCache<K,V>
extends java.lang.Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private classstl_SimpleCache.CacheEntry<T>private classstl_SimpleCache.CleanupTask -
Field Summary
Fields Modifier and Type Field Description private java.util.Map<K,stl_SimpleCache.CacheEntry<V>>cacheprivate java.util.TimercleanupTimerprivate longtimeoutMillisprivate longtoleranceMillis -
Constructor Summary
Constructors Constructor Description stl_SimpleCache(long timeoutMillis, long toleranceMillis) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
cache
-
timeoutMillis
private final long timeoutMillis -
toleranceMillis
private final long toleranceMillis -
cleanupTimer
private final java.util.Timer cleanupTimer
-
-
Constructor Details
-
stl_SimpleCache
public stl_SimpleCache(long timeoutMillis, long toleranceMillis)
-
-
Method Details
-
put
-
get
-