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 class
Cache.CacheException
static interface
Cache.CacheSupplier<V>
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description V
computeIfAbsent(K key, Cache.CacheSupplier<V> supplier)
V
get(K key)
java.util.Set<K>
keySet()
V
put(K key, V value)
V
putIfAbsent(K key, V value)
V
remove(K key)
void
setMaxSize(int maxSize)
int
size()
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)
-
-