io.quarkus.redis.datasource.bloom.ReactiveTransactionalBloomCommands Maven / Gradle / Ivy
Show all versions of quarkus-redis-client Show documentation
package io.quarkus.redis.datasource.bloom;
import io.quarkus.redis.datasource.ReactiveTransactionalRedisCommands;
import io.smallrye.mutiny.Uni;
public interface ReactiveTransactionalBloomCommands extends ReactiveTransactionalRedisCommands {
/**
* Execute the command BF.ADD.
* Summary: Adds the specified element to the specified Bloom filter.
* Group: bloom
*
* If the bloom filter does not exist, it creates a new one.
*
* @param key the key
* @param value the value, must not be {@code null}
* @return A {@code Uni} emitting {@code null} when the command has been enqueued successfully in the transaction, a failure
* otherwise. In the case of failure, the transaction is discarded.
**/
Uni bfadd(K key, V value);
/**
* Execute the command BF.EXISTS.
* Summary: Determines whether an item may exist in the Bloom Filter or not.
* Group: bloom
*
* @param key the key
* @param value the value, must not be {@code null}
* @return A {@code Uni} emitting {@code null} when the command has been enqueued successfully in the transaction, a failure
* otherwise. In the case of failure, the transaction is discarded.
**/
Uni bfexists(K key, V value);
/**
* Execute 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
*
*
* @param key the key
* @param values the values, must not be {@code null}, must not contain {@code null}, must not be empty.
* @return A {@code Uni} emitting {@code null} when the command has been enqueued successfully in the transaction, a failure
* otherwise. In the case of failure, the transaction is discarded.
**/
Uni bfmadd(K key, V... values);
/**
* Execute the command BF.MEXISTS.
* Summary: Determines if one or more items may exist in the filter or not.
* Group: bloom
*
* @param key the key
* @param values the values, must not be {@code null}, must not contain {@code null}, must not be empty.
* @return A {@code Uni} emitting {@code null} when the command has been enqueued successfully in the transaction, a failure
* otherwise. In the case of failure, the transaction is discarded.
**/
Uni bfmexists(K key, V... values);
/**
* Execute the command BF.RESERVE.
* Summary: Creates an empty Bloom Filter with a single sub-filter for the initial capacity requested and with an
* upper bound {@code error_rate}.
* Group: bloom
*
* @param key the key
* @param errorRate The desired probability for false positives. The rate is a decimal value between 0 and 1.
* @param capacity The number of entries intended to be added to the filter.
* @return A {@code Uni} emitting {@code null} when the command has been enqueued successfully in the transaction, a failure
* otherwise. In the case of failure, the transaction is discarded.
**/
Uni bfreserve(K key, double errorRate, long capacity);
/**
* Execute the command BF.RESERVE.
* Summary: Creates an empty Bloom Filter with a single sub-filter for the initial capacity requested and with an
* upper bound {@code error_rate}.
* Group: bloom
*
* @param key the key
* @param errorRate The desired probability for false positives. The rate is a decimal value between 0 and 1.
* @param capacity The number of entries intended to be added to the filter.
* @param args the extra parameters
* @return A {@code Uni} emitting {@code null} when the command has been enqueued successfully in the transaction, a failure
* otherwise. In the case of failure, the transaction is discarded.
**/
Uni bfreserve(K key, double errorRate, long capacity, BfReserveArgs args);
/**
* Execute the command BF.INSERT.
* Summary: BF.INSERT is a sugarcoated combination of {@code BF.RESERVE} and {@code BF.ADD}. It creates a new filter
* if the key does not exist using the relevant arguments. Next, all {@code ITEMS} are inserted.
* Group: bloom
*
*
* @param key the key
* @param args the creation parameters
* @param values the value to add, must not contain {@code null}, must not be {@code null}, must not be empty
* @return A {@code Uni} emitting {@code null} when the command has been enqueued successfully in the transaction, a failure
* otherwise. In the case of failure, the transaction is discarded.
**/
Uni bfinsert(K key, BfInsertArgs args, V... values);
}