Package discord4j.store.api.primitive
Interface LongObjStore<V>
-
- Type Parameters:
V- The value type, these follow JavaBean conventions.
- All Superinterfaces:
ReadOnlyStore<Long,V>,Store<Long,V>
- All Known Implementing Classes:
DelegatingLongObjStore,ForwardingStore,NoOpLongObjStore,ReadOnlyLongObjStore
public interface LongObjStore<V> extends Store<Long,V>
This provides an active data connection to a store's data source.- See Also:
Store
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Mono<Void>delete(long id)Deletes a value associated with the provided id.default 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>deleteInRange(long start, long end)Deletes values within a range of ids.default Mono<Void>deleteInRange(Long start, Long end)Deletes values within a range of ids.default 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.default 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.default Flux<V>findInRange(Long start, Long end)Retrieves all stored values with ids within a provided range.default Flux<LongObjTuple2<V>>longObjEntries()Gets a stream of all entries in the data source.default Mono<Void>save(Long key, V value)Stores a key value pair.default 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.-
Methods inherited from interface discord4j.store.api.ReadOnlyStore
count, keys, values
-
Methods inherited from interface discord4j.store.api.Store
deleteAll, invalidate
-
-
-
-
Method Detail
-
save
default Mono<Void> save(Long key, V value)
Description copied from interface:StoreStores a key value pair.
-
saveWithLong
Mono<Void> saveWithLong(long key, V value)
Stores a key value pair.- Parameters:
key- The key representing the value.value- The value.- Returns:
- A mono which signals the completion of the storage of the pair.
-
save
default Mono<Void> save(Publisher<Tuple2<Long,V>> entryStream)
Description copied from interface:StoreStores key value pairs.
-
saveWithLong
Mono<Void> saveWithLong(Publisher<LongObjTuple2<V>> entryStream)
Stores key value pairs.- Parameters:
entryStream- A flux providing the key value pairs.- Returns:
- A mono which signals the completion of the storage of the pairs.
-
find
default Mono<V> find(Long id)
Description copied from interface:ReadOnlyStoreAttempts to find the value associated with the provided id.- Specified by:
findin interfaceReadOnlyStore<Long,V>- Parameters:
id- The id to search with.- Returns:
- A mono, which may or may not contain an associated object.
-
find
Mono<V> find(long id)
Attempts to find the value associated with the provided id.- Parameters:
id- The id to search with.- Returns:
- A mono, which may or may not contain an associated object.
-
findInRange
default Flux<V> findInRange(Long start, Long end)
Description copied from interface:ReadOnlyStoreRetrieves all stored values with ids within a provided range.- Specified by:
findInRangein interfaceReadOnlyStore<Long,V>- Parameters:
start- The starting key (inclusive).end- The ending key (exclusive).- Returns:
- The stream of values with ids within the provided range.
-
findInRange
Flux<V> findInRange(long start, long end)
Retrieves all stored values with ids within a provided range.- Parameters:
start- The starting key (inclusive).end- The ending key (exclusive).- Returns:
- The stream of values with ids within the provided range.
-
delete
default Mono<Void> delete(Long id)
Description copied from interface:StoreDeletes a value associated with the provided id.
-
delete
Mono<Void> delete(long id)
Deletes a value associated with the provided id.- Parameters:
id- The id of the value to delete.- Returns:
- A mono which signals the completion of the deletion of the value.
-
delete
Mono<Void> delete(Publisher<Long> ids)
Description copied from interface:StoreDeletes the values associated with the provided ids.
-
deleteInRange
default Mono<Void> deleteInRange(Long start, Long end)
Description copied from interface:StoreDeletes values within a range of ids.- Specified by:
deleteInRangein interfaceStore<Long,V>- Parameters:
start- The starting key (inclusive).end- The ending key (exclusive).- Returns:
- A mono which signals the completion of the deletion of values.
-
deleteInRange
Mono<Void> deleteInRange(long start, long end)
Deletes values within a range of ids.- Parameters:
start- The starting key (inclusive).end- The ending key (exclusive).- Returns:
- A mono which signals the completion of the deletion of values.
-
entries
default Flux<Tuple2<Long,V>> entries()
Description copied from interface:ReadOnlyStoreGets a stream of all entries in the data source.- Specified by:
entriesin interfaceReadOnlyStore<Long,V>- Returns:
- The stream of all entries stored.
-
longObjEntries
default Flux<LongObjTuple2<V>> longObjEntries()
Gets a stream of all entries in the data source.- Returns:
- The stream of all entries stored.
-
-