Package discord4j.store.api.view
Class LongObjStoreView<V>
- java.lang.Object
-
- discord4j.store.api.view.LongObjStoreView<V>
-
public class LongObjStoreView<V> extends Object
-
-
Constructor Summary
Constructors Constructor Description LongObjStoreView(LongObjStore<V> backing)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Mono<Long>count()Retrieves the amount of stored values in the data source currently.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.Flux<V>findInRange(long start, long end)Retrieves all stored values with ids within a provided range.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.Flux<V>values()Gets a stream of all values in the data source.
-
-
-
Constructor Detail
-
LongObjStoreView
public LongObjStoreView(LongObjStore<V> backing)
-
-
Method Detail
-
find
public 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
public 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.
-
count
public Mono<Long> count()
Retrieves the amount of stored values in the data source currently.- Returns:
- A mono which provides the amount of stored values.
-
keys
public Flux<Long> keys()
Gets a stream of all keys in the data source.- Returns:
- The stream of keys stored.
-
values
public Flux<V> values()
Gets a stream of all values in the data source.- Returns:
- The stream of values stored.
-
entries
public Flux<Tuple2<Long,V>> entries()
Gets a stream of all entries in the data source.- Returns:
- The stream of all entries stored.
-
longObjEntries
public Flux<LongObjTuple2<V>> longObjEntries()
Gets a stream of all entries in the data source.- Returns:
- The stream of all entries stored.
-
-