Package tigase.pubsub.utils
Class LRUCacheWithFuture<K,V>
- java.lang.Object
-
- tigase.pubsub.utils.LRUCacheWithFuture<K,V>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface tigase.pubsub.utils.Cache
Cache.CacheException, Cache.CacheSupplier<V>
-
-
Constructor Summary
Constructors Constructor Description LRUCacheWithFuture()
LRUCacheWithFuture(int maxSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description V
computeIfAbsent(K key, Cache.CacheSupplier<V> supplier)
void
everyHour()
void
everyMinute()
void
everySecond()
V
get(K key)
void
getStatistics(java.lang.String compName, tigase.stats.StatisticsList list)
java.util.Set<K>
keySet()
V
put(K key, V value)
V
putIfAbsent(K key, V value)
V
remove(K key)
void
setMaxSize(int size)
void
setStatisticsPrefix(java.lang.String prefix)
int
size()
void
statisticExecutedIn(long executionTime)
java.util.stream.Stream<V>
values()
-
-
-
Method Detail
-
computeIfAbsent
public V computeIfAbsent(K key, Cache.CacheSupplier<V> supplier) throws Cache.CacheException
- Specified by:
computeIfAbsent
in interfaceCache<K,V>
- Throws:
Cache.CacheException
-
putIfAbsent
public V putIfAbsent(K key, V value)
- Specified by:
putIfAbsent
in interfaceCache<K,V>
-
setMaxSize
public void setMaxSize(int size)
- Specified by:
setMaxSize
in interfaceCache<K,V>
-
everyHour
public void everyHour()
- Specified by:
everyHour
in interfacetigase.stats.StatisticHolder
-
everyMinute
public void everyMinute()
- Specified by:
everyMinute
in interfacetigase.stats.StatisticHolder
-
everySecond
public void everySecond()
- Specified by:
everySecond
in interfacetigase.stats.StatisticHolder
-
getStatistics
public void getStatistics(java.lang.String compName, tigase.stats.StatisticsList list)
- Specified by:
getStatistics
in interfacetigase.stats.StatisticHolder
-
setStatisticsPrefix
public void setStatisticsPrefix(java.lang.String prefix)
- Specified by:
setStatisticsPrefix
in interfacetigase.stats.StatisticHolder
-
statisticExecutedIn
public void statisticExecutedIn(long executionTime)
- Specified by:
statisticExecutedIn
in interfacetigase.stats.StatisticHolder
-
-