Package tigase.pubsub.utils
Interface Cache<K,V>
-
- All Superinterfaces:
tigase.stats.StatisticHolder
- All Known Implementing Classes:
LRUCache,LRUCacheWithFuture
public interface Cache<K,V> extends tigase.stats.StatisticHolder
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classCache.CacheExceptionstatic interfaceCache.CacheSupplier<V>
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description VcomputeIfAbsent(K key, Cache.CacheSupplier<V> supplier)Vget(K key)java.util.Set<K>keySet()Vput(K key, V value)VputIfAbsent(K key, V value)Vremove(K key)voidsetMaxSize(int maxSize)intsize()java.util.stream.Stream<V>values()
-
-
-
Method Detail
-
computeIfAbsent
V computeIfAbsent(K key, Cache.CacheSupplier<V> supplier) throws Cache.CacheException
- Throws:
Cache.CacheException
-
keySet
java.util.Set<K> keySet()
-
values
java.util.stream.Stream<V> values()
-
size
int size()
-
setMaxSize
void setMaxSize(int maxSize)
-
-