Cache.EvictionStrategy
DEFAULT_MAX_ENTRIES, DEFAULT_TIME_TO_LIVE_SECONDS, LEAST_FREQUENTLY_USED, LEAST_RECENTLY_ADDED, LEAST_RECENTLY_USED
Constructor and Description |
---|
DefaultCache() |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
V |
get(K key) |
Cache.EvictionStrategy |
getEvictionStrategy() |
long |
getHitCount() |
Map<K,V> |
getItems(int n) |
long |
getMissCount() |
String |
getName() |
V |
put(K key,
V value) |
V |
put(K key,
V value,
int liveInSeconds) |
V |
remove(K key) |
void |
setEvictionStrategy(Cache.EvictionStrategy evictionStrategy) |
void |
setMaxEntries(int maxEntries) |
void |
setTimeToLiveSeconds(int timeToLiveSeconds) |
void |
shutDown() |
void |
start(String name) |
public void setEvictionStrategy(Cache.EvictionStrategy evictionStrategy)
setEvictionStrategy
in interface Cache<K,V>
public Cache.EvictionStrategy getEvictionStrategy()
getEvictionStrategy
in interface Cache<K,V>
public void setMaxEntries(int maxEntries)
setMaxEntries
in interface Cache<K,V>
public void setTimeToLiveSeconds(int timeToLiveSeconds)
setTimeToLiveSeconds
in interface Cache<K,V>
public long getHitCount()
getHitCount
in interface Cache<K,V>
public long getMissCount()
getMissCount
in interface Cache<K,V>
Copyright © 2016 huihoo. All rights reserved.