Package tigase.pubsub.repository.cached
Class CachedPubSubRepository.SizedCache<V>
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<K,V>
java.util.LinkedHashMap<CachedPubSubRepository.NodeKey,V>
tigase.pubsub.repository.cached.CachedPubSubRepository.SizedCache<V>
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<CachedPubSubRepository.NodeKey,
,V> tigase.stats.StatisticHolder
- Enclosing class:
- CachedPubSubRepository<T>
public static class CachedPubSubRepository.SizedCache<V>
extends LinkedHashMap<CachedPubSubRepository.NodeKey,V>
implements tigase.stats.StatisticHolder
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,
V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
void
getStatistics
(String compName, tigase.stats.StatisticsList list) protected boolean
void
setStatisticsPrefix
(String prefix) void
statisticExecutedIn
(long executionTime) Methods inherited from class java.util.LinkedHashMap
clear, containsValue, entrySet, forEach, getOrDefault, keySet, replaceAll, values
Methods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
-
Constructor Details
-
SizedCache
public SizedCache(int maxSize)
-
-
Method Details
-
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
-
get
- Specified by:
get
in interfaceMap<CachedPubSubRepository.NodeKey,
V> - Overrides:
get
in classLinkedHashMap<CachedPubSubRepository.NodeKey,
V>
-
getStatistics
- Specified by:
getStatistics
in interfacetigase.stats.StatisticHolder
-
setStatisticsPrefix
- Specified by:
setStatisticsPrefix
in interfacetigase.stats.StatisticHolder
-
statisticExecutedIn
public void statisticExecutedIn(long executionTime) - Specified by:
statisticExecutedIn
in interfacetigase.stats.StatisticHolder
-
removeEldestEntry
- Overrides:
removeEldestEntry
in classLinkedHashMap<CachedPubSubRepository.NodeKey,
V>
-