K
- The key type which provides a 1:1 mapping to the value type. This type is also expected to be
Comparable
in order to allow for range operations.V
- The value type, these follow
JavaBean conventions.public interface Store<K extends Comparable<K>,V extends Serializable>
LongObjStore
Modifier and Type | Method and Description |
---|---|
Mono<Long> |
count()
Retrieves the amount of stored values in the data source currently.
|
Mono<Void> |
delete(K id)
Deletes a value associated with the provided id.
|
Mono<Void> |
delete(Publisher<K> ids)
Deletes the values associated with the provided ids.
|
Mono<Void> |
deleteAll()
Deletes all entries in the data source.
|
Mono<Void> |
deleteInRange(K start,
K end)
Deletes values within a range of ids.
|
default Flux<Tuple2<K,V>> |
entries()
Gets a stream of all entries in the data source.
|
Mono<V> |
find(K id)
Attempts to find the value associated with the provided id.
|
Flux<V> |
findInRange(K start,
K end)
Retrieves all stored values with ids within a provided range.
|
Mono<Void> |
invalidate()
Invalidates the contents of the store.
|
Flux<K> |
keys()
Gets a stream of all keys in the data source.
|
Mono<Void> |
save(K key,
V value)
Stores a key value pair.
|
Mono<Void> |
save(Publisher<Tuple2<K,V>> entryStream)
Stores key value pairs.
|
Flux<V> |
values()
Gets a stream of all values in the data source.
|
Mono<Void> save(K key, V value)
key
- The key representing the value.value
- The value.Mono<Void> save(Publisher<Tuple2<K,V>> entryStream)
entryStream
- A flux providing the key value pairs.Mono<V> find(K id)
id
- The id to search with.Flux<V> findInRange(K start, K end)
start
- The starting key (inclusive).end
- The ending key (exclusive).Mono<Long> count()
Mono<Void> delete(K id)
id
- The id of the value to delete.Mono<Void> delete(Publisher<K> ids)
ids
- A stream of ids to delete values for.Mono<Void> deleteInRange(K start, K end)
start
- The starting key (inclusive).end
- The ending key (exclusive).Mono<Void> deleteAll()
Flux<K> keys()
Flux<V> values()
default Flux<Tuple2<K,V>> entries()