K
- the store keysV
- the store valuespublic class JdkCachingStore<K extends Comparable<K>,V> extends Object implements Store<K,V>
Store
that can delegate storage while keeping a cache above it, using a JDK ConcurrentHashMap
.Constructor and Description |
---|
JdkCachingStore(Store<K,V> delegate,
Function<K,Duration> ttlFactory) |
Modifier and Type | Method and Description |
---|---|
Mono<Long> |
count() |
Mono<Void> |
delete(K id) |
Mono<Void> |
delete(Publisher<K> ids) |
Mono<Void> |
deleteAll() |
Mono<Void> |
deleteInRange(K start,
K end) |
Mono<V> |
find(K id) |
Flux<V> |
findInRange(K start,
K end) |
Mono<Void> |
invalidate() |
Flux<K> |
keys() |
Mono<Void> |
save(K key,
V value) |
Mono<Void> |
save(Publisher<Tuple2<K,V>> entryStream) |
Flux<V> |
values() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
entries
public Mono<V> find(K id)
find
in interface ReadOnlyStore<K extends Comparable<K>,V>
public Flux<V> findInRange(K start, K end)
findInRange
in interface ReadOnlyStore<K extends Comparable<K>,V>
public Mono<Long> count()
count
in interface ReadOnlyStore<K extends Comparable<K>,V>
public Flux<K> keys()
keys
in interface ReadOnlyStore<K extends Comparable<K>,V>
public Flux<V> values()
values
in interface ReadOnlyStore<K extends Comparable<K>,V>
public Mono<Void> deleteInRange(K start, K end)
deleteInRange
in interface Store<K extends Comparable<K>,V>
public Mono<Void> invalidate()
invalidate
in interface Store<K extends Comparable<K>,V>