K - the store keysV - the store valuespublic class JdkStore<K extends Comparable<K>,V> extends Object implements Store<K,V>
| Constructor and Description |
|---|
JdkStore(boolean persist)
|
JdkStore(Map<K,V> map)
|
| 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) |
Flux<Tuple2<K,V>> |
entries() |
Mono<V> |
find(K id) |
Flux<V> |
findInRange(K start,
K end) |
protected Map<K,V> |
getMap() |
Mono<Void> |
invalidate() |
Flux<K> |
keys() |
Mono<Void> |
save(K key,
V value) |
Mono<Void> |
save(Publisher<Tuple2<K,V>> entryStream) |
String |
toString() |
Flux<V> |
values() |
public JdkStore(boolean persist)
persist - whether this store is expected to hold onto the stored values indefinitely. Will use a
ConcurrentHashMap as backing if true, and a thread-safe WeakHashMap otherwise.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 Mono<Void> deleteInRange(K start, K end)
deleteInRange in interface Store<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 Flux<Tuple2<K,V>> entries()
entries in interface ReadOnlyStore<K extends Comparable<K>,V>public Mono<Void> invalidate()
invalidate in interface Store<K extends Comparable<K>,V>