Class ReactiveBloomCommandsImpl<K,V>

All Implemented Interfaces:
ReactiveBloomCommands<K,V>, ReactiveRedisCommands

public class ReactiveBloomCommandsImpl<K,V> extends AbstractBloomCommands<K,V> implements ReactiveBloomCommands<K,V>
  • Constructor Details

  • Method Details

    • getDataSource

      public ReactiveRedisDataSource getDataSource()
      Specified by:
      getDataSource in interface ReactiveRedisCommands
      Returns:
      the data source.
    • bfadd

      public io.smallrye.mutiny.Uni<Boolean> bfadd(K key, V value)
      Description copied from interface: ReactiveBloomCommands
      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.

      Specified by:
      bfadd in interface ReactiveBloomCommands<K,V>
      Parameters:
      key - the key
      value - the value, must not be null
      Returns:
      a uni producing true if the value did not exist in the filter, false otherwise.
    • bfexists

      public io.smallrye.mutiny.Uni<Boolean> bfexists(K key, V value)
      Description copied from interface: ReactiveBloomCommands
      Execute the command BF.EXISTS. Summary: Determines whether an item may exist in the Bloom Filter or not. Group: bloom
      Specified by:
      bfexists in interface ReactiveBloomCommands<K,V>
      Parameters:
      key - the key
      value - the value, must not be null
      Returns:
      a uni producing true if the value may exist in the filter, false means it does not exist in the filter.
    • bfmadd

      public io.smallrye.mutiny.Uni<List<Boolean>> bfmadd(K key, V... values)
      Description copied from interface: ReactiveBloomCommands
      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

      Specified by:
      bfmadd in interface ReactiveBloomCommands<K,V>
      Parameters:
      key - the key
      values - the values, must not be null, must not contain null, must not be empty.
      Returns:
      a uni producing a list of booleans. true if the corresponding value did not exist in the filter, false otherwise.
    • 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: ReactiveBloomCommands
      Execute the command BF.MEXISTS. Summary: Determines if one or more items may exist in the filter or not. Group: bloom
      Specified by:
      bfmexists in interface ReactiveBloomCommands<K,V>
      Parameters:
      key - the key
      values - the values, must not be null, must not contain null, must not be empty.
      Returns:
      a uni producing a list of booleans. true if the corresponding value may exist in the filter, false does not exist in the filter.
    • bfreserve

      public io.smallrye.mutiny.Uni<Void> bfreserve(K key, double errorRate, long capacity)
      Description copied from interface: ReactiveBloomCommands
      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 error_rate. Group: bloom
      Specified by:
      bfreserve in interface ReactiveBloomCommands<K,V>
      Parameters:
      key - the key
      errorRate - 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 null when the operation completes
    • bfreserve

      public io.smallrye.mutiny.Uni<Void> bfreserve(K key, double errorRate, long capacity, BfReserveArgs args)
      Description copied from interface: ReactiveBloomCommands
      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 error_rate. Group: bloom
      Specified by:
      bfreserve in interface ReactiveBloomCommands<K,V>
      Parameters:
      key - the key
      errorRate - 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 null when the operation completes
    • bfinsert

      public io.smallrye.mutiny.Uni<List<Boolean>> bfinsert(K key, BfInsertArgs args, V... values)
      Description copied from interface: ReactiveBloomCommands
      Execute the command BF.INSERT. Summary: BF.INSERT is a sugarcoated combination of BF.RESERVE and BF.ADD. It creates a new filter if the key does not exist using the relevant arguments. Next, all ITEMS are inserted. Group: bloom

      Specified by:
      bfinsert in interface ReactiveBloomCommands<K,V>
      Parameters:
      key - the key
      args - the creation parameters
      values - the value to add, must not contain null, must not be null, must not be empty
      Returns:
      a uni producing a list of booleans. true if the corresponding value may exist in the filter, false does not exist in the filter.