Class ReactiveBloomCommandsImpl<K,V>
- java.lang.Object
-
- io.quarkus.redis.runtime.datasource.AbstractRedisCommands
-
- io.quarkus.redis.runtime.datasource.AbstractBloomCommands<K,V>
-
- io.quarkus.redis.runtime.datasource.ReactiveBloomCommandsImpl<K,V>
-
- All Implemented Interfaces:
ReactiveBloomCommands<K,V>,ReactiveRedisCommands
public class ReactiveBloomCommandsImpl<K,V> extends AbstractBloomCommands<K,V> implements ReactiveBloomCommands<K,V>
-
-
Field Summary
-
Fields inherited from class io.quarkus.redis.runtime.datasource.AbstractRedisCommands
marshaller, redis
-
-
Constructor Summary
Constructors Constructor Description ReactiveBloomCommandsImpl(ReactiveRedisDataSourceImpl redis, Class<K> k, Class<V> v)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description io.smallrye.mutiny.Uni<Boolean>bfadd(K key, V value)Execute the command BF.ADD.io.smallrye.mutiny.Uni<Boolean>bfexists(K key, V value)Execute the command BF.EXISTS.io.smallrye.mutiny.Uni<List<Boolean>>bfinsert(K key, BfInsertArgs args, V... values)Execute the command BF.INSERT.io.smallrye.mutiny.Uni<List<Boolean>>bfmadd(K key, V... values)Execute the command BF.MADD.io.smallrye.mutiny.Uni<List<Boolean>>bfmexists(K key, V... values)Execute the command BF.MEXISTS.io.smallrye.mutiny.Uni<Void>bfreserve(K key, double errorRate, long capacity)Execute the command BF.RESERVE.io.smallrye.mutiny.Uni<Void>bfreserve(K key, double errorRate, long capacity, BfReserveArgs args)Execute the command BF.RESERVE.(package private) static List<Boolean>decodeAsListOfBooleans(io.vertx.mutiny.redis.client.Response r)ReactiveRedisDataSourcegetDataSource()-
Methods inherited from class io.quarkus.redis.runtime.datasource.AbstractBloomCommands
_bfadd, _bfexists, _bfinsert, _bfmadd, _bfmexists, _bfreserve
-
Methods inherited from class io.quarkus.redis.runtime.datasource.AbstractRedisCommands
execute
-
-
-
-
Constructor Detail
-
ReactiveBloomCommandsImpl
public ReactiveBloomCommandsImpl(ReactiveRedisDataSourceImpl redis, Class<K> k, Class<V> v)
-
-
Method Detail
-
getDataSource
public ReactiveRedisDataSource getDataSource()
- Specified by:
getDataSourcein interfaceReactiveRedisCommands- Returns:
- the data source.
-
bfadd
public io.smallrye.mutiny.Uni<Boolean> bfadd(K key, V value)
Description copied from interface:ReactiveBloomCommandsExecute the command BF.ADD. Summary: Adds the specified element to the specified Bloom filter. Group: bloomIf the bloom filter does not exist, it creates a new one.
- Specified by:
bfaddin interfaceReactiveBloomCommands<K,V>- Parameters:
key- the keyvalue- the value, must not benull- Returns:
- a uni producing
trueif the value did not exist in the filter,falseotherwise.
-
bfexists
public io.smallrye.mutiny.Uni<Boolean> bfexists(K key, V value)
Description copied from interface:ReactiveBloomCommandsExecute the command BF.EXISTS. Summary: Determines whether an item may exist in the Bloom Filter or not. Group: bloom- Specified by:
bfexistsin interfaceReactiveBloomCommands<K,V>- Parameters:
key- the keyvalue- the value, must not benull- Returns:
- a uni producing
trueif the value may exist in the filter,falsemeans it does not exist in the filter.
-
bfmadd
public io.smallrye.mutiny.Uni<List<Boolean>> bfmadd(K key, V... values)
Description copied from interface:ReactiveBloomCommandsExecute the command BF.MADD. Summary: Adds one or more items to the Bloom Filter and creates the filter if it does not exist yet. This command operates identically to BF.ADD except that it allows multiple inputs and returns multiple values. Group: bloom- Specified by:
bfmaddin interfaceReactiveBloomCommands<K,V>- Parameters:
key- the keyvalues- the values, must not benull, must not containnull, must not be empty.- Returns:
- a uni producing a list of booleans.
trueif the corresponding value did not exist in the filter,falseotherwise.
-
decodeAsListOfBooleans
static List<Boolean> decodeAsListOfBooleans(io.vertx.mutiny.redis.client.Response r)
-
bfmexists
public io.smallrye.mutiny.Uni<List<Boolean>> bfmexists(K key, V... values)
Description copied from interface:ReactiveBloomCommandsExecute the command BF.MEXISTS. Summary: Determines if one or more items may exist in the filter or not. Group: bloom- Specified by:
bfmexistsin interfaceReactiveBloomCommands<K,V>- Parameters:
key- the keyvalues- the values, must not benull, must not containnull, must not be empty.- Returns:
- a uni producing a list of booleans.
trueif the corresponding value may exist in the filter,falsedoes not exist in the filter.
-
bfreserve
public io.smallrye.mutiny.Uni<Void> bfreserve(K key, double errorRate, long capacity)
Description copied from interface:ReactiveBloomCommandsExecute the command BF.RESERVE. Summary: Creates an empty Bloom Filter with a single sub-filter for the initial capacity requested and with an upper bounderror_rate. Group: bloom- Specified by:
bfreservein interfaceReactiveBloomCommands<K,V>- Parameters:
key- the keyerrorRate- The desired probability for false positives. The rate is a decimal value between 0 and 1.capacity- The number of entries intended to be added to the filter.- Returns:
- a uni producing
nullwhen the operation completes
-
bfreserve
public io.smallrye.mutiny.Uni<Void> bfreserve(K key, double errorRate, long capacity, BfReserveArgs args)
Description copied from interface:ReactiveBloomCommandsExecute the command BF.RESERVE. Summary: Creates an empty Bloom Filter with a single sub-filter for the initial capacity requested and with an upper bounderror_rate. Group: bloom- Specified by:
bfreservein interfaceReactiveBloomCommands<K,V>- Parameters:
key- the keyerrorRate- The desired probability for false positives. The rate is a decimal value between 0 and 1.capacity- The number of entries intended to be added to the filter.args- the extra parameters- Returns:
- a uni producing
nullwhen the operation completes
-
bfinsert
public io.smallrye.mutiny.Uni<List<Boolean>> bfinsert(K key, BfInsertArgs args, V... values)
Description copied from interface:ReactiveBloomCommandsExecute the command BF.INSERT. Summary: BF.INSERT is a sugarcoated combination ofBF.RESERVEandBF.ADD. It creates a new filter if the key does not exist using the relevant arguments. Next, allITEMSare inserted. Group: bloom- Specified by:
bfinsertin interfaceReactiveBloomCommands<K,V>- Parameters:
key- the keyargs- the creation parametersvalues- the value to add, must not containnull, must not benull, must not be empty- Returns:
- a uni producing a list of booleans.
trueif the corresponding value may exist in the filter,falsedoes not exist in the filter.
-
-