public class ForwardingStore<V extends Serializable> extends Object implements LongObjStore<V>
LongObjStore
which is a data connection that delegates to another, generic
one.LongObjStore
Constructor and Description |
---|
ForwardingStore(Store<Long,V> toForward)
Constructs the data connection.
|
Modifier and Type | Method and Description |
---|---|
Mono<Long> |
count()
Retrieves the amount of stored values in the data source currently.
|
Mono<Void> |
delete(long id)
Deletes a value associated with the provided id.
|
Mono<Void> |
delete(Long id)
Deletes a value associated with the provided id.
|
Mono<Void> |
delete(Publisher<Long> ids)
Deletes the values associated with the provided ids.
|
Mono<Void> |
deleteAll()
Deletes all entries in the data source.
|
Mono<Void> |
deleteInRange(long start,
long end)
Deletes values within a range of ids.
|
Mono<Void> |
deleteInRange(Long start,
Long end)
Deletes values within a range of ids.
|
Flux<Tuple2<Long,V>> |
entries()
Gets a stream of all entries in the data source.
|
Mono<V> |
find(long id)
Attempts to find the value associated with the provided id.
|
Mono<V> |
find(Long id)
Attempts to find the value associated with the provided id.
|
Flux<V> |
findInRange(long start,
long end)
Retrieves all stored values with ids within a provided range.
|
Flux<V> |
findInRange(Long start,
Long end)
Retrieves all stored values with ids within a provided range.
|
protected Store<Long,V> |
getOriginal()
Gets the original, generic data connection.
|
Mono<Void> |
invalidate()
Invalidates the contents of the store.
|
Flux<Long> |
keys()
Gets a stream of all keys in the data source.
|
Flux<LongObjTuple2<V>> |
longObjEntries()
Gets a stream of all entries in the data source.
|
Mono<Void> |
save(Long key,
V value)
Stores a key value pair.
|
Mono<Void> |
save(Publisher<Tuple2<Long,V>> entryStream)
Stores key value pairs.
|
Mono<Void> |
saveWithLong(long key,
V value)
Stores a key value pair.
|
Mono<Void> |
saveWithLong(Publisher<LongObjTuple2<V>> entryStream)
Stores key value pairs.
|
String |
toString() |
Flux<V> |
values()
Gets a stream of all values in the data source.
|
protected Store<Long,V> getOriginal()
public Mono<Void> save(Long key, V value)
Store
save
in interface LongObjStore<V extends Serializable>
save
in interface Store<Long,V extends Serializable>
key
- The key representing the value.value
- The value.public Mono<Void> saveWithLong(long key, V value)
LongObjStore
saveWithLong
in interface LongObjStore<V extends Serializable>
key
- The key representing the value.value
- The value.public Mono<Void> save(Publisher<Tuple2<Long,V>> entryStream)
Store
save
in interface LongObjStore<V extends Serializable>
save
in interface Store<Long,V extends Serializable>
entryStream
- A flux providing the key value pairs.public Mono<Void> saveWithLong(Publisher<LongObjTuple2<V>> entryStream)
LongObjStore
saveWithLong
in interface LongObjStore<V extends Serializable>
entryStream
- A flux providing the key value pairs.public Mono<V> find(Long id)
Store
find
in interface LongObjStore<V extends Serializable>
find
in interface Store<Long,V extends Serializable>
id
- The id to search with.public Mono<V> find(long id)
LongObjStore
find
in interface LongObjStore<V extends Serializable>
id
- The id to search with.public Flux<V> findInRange(Long start, Long end)
Store
findInRange
in interface LongObjStore<V extends Serializable>
findInRange
in interface Store<Long,V extends Serializable>
start
- The starting key (inclusive).end
- The ending key (exclusive).public Flux<V> findInRange(long start, long end)
LongObjStore
findInRange
in interface LongObjStore<V extends Serializable>
start
- The starting key (inclusive).end
- The ending key (exclusive).public Mono<Long> count()
Store
count
in interface Store<Long,V extends Serializable>
public Mono<Void> delete(Long id)
Store
delete
in interface LongObjStore<V extends Serializable>
delete
in interface Store<Long,V extends Serializable>
id
- The id of the value to delete.public Mono<Void> delete(long id)
LongObjStore
delete
in interface LongObjStore<V extends Serializable>
id
- The id of the value to delete.public Mono<Void> delete(Publisher<Long> ids)
Store
delete
in interface LongObjStore<V extends Serializable>
delete
in interface Store<Long,V extends Serializable>
ids
- A stream of ids to delete values for.public Mono<Void> deleteInRange(Long start, Long end)
Store
deleteInRange
in interface LongObjStore<V extends Serializable>
deleteInRange
in interface Store<Long,V extends Serializable>
start
- The starting key (inclusive).end
- The ending key (exclusive).public Mono<Void> deleteInRange(long start, long end)
LongObjStore
deleteInRange
in interface LongObjStore<V extends Serializable>
start
- The starting key (inclusive).end
- The ending key (exclusive).public Mono<Void> deleteAll()
Store
deleteAll
in interface Store<Long,V extends Serializable>
public Flux<Long> keys()
Store
keys
in interface Store<Long,V extends Serializable>
public Flux<V> values()
Store
values
in interface Store<Long,V extends Serializable>
public Flux<Tuple2<Long,V>> entries()
Store
entries
in interface LongObjStore<V extends Serializable>
entries
in interface Store<Long,V extends Serializable>
public Mono<Void> invalidate()
Store
invalidate
in interface Store<Long,V extends Serializable>
public Flux<LongObjTuple2<V>> longObjEntries()
LongObjStore
longObjEntries
in interface LongObjStore<V extends Serializable>