Class BloomOperationsImpl<K>

java.lang.Object
com.redis.om.spring.ops.pds.BloomOperationsImpl<K>
All Implemented Interfaces:
BloomOperations<K>

public class BloomOperationsImpl<K> extends Object implements BloomOperations<K>
  • Constructor Details

  • Method Details

    • createFilter

      public void createFilter(K name, long initCapacity, double errorRate)
      Description copied from interface: BloomOperations
      Reserve a bloom filter.
      Specified by:
      createFilter in interface BloomOperations<K>
      Parameters:
      name - The key of the filter
      initCapacity - Optimize for this many items
      errorRate - The desired rate of false positives Note that if a filter is not reserved, a new one is created when is called.
    • add

      public boolean add(K name, String value)
      Description copied from interface: BloomOperations
      Adds an item to the filter
      Specified by:
      add in interface BloomOperations<K>
      Parameters:
      name - The name of the filter
      value - The value to add to the filter
      Returns:
      true if the item was not previously in the filter.
    • insert

      public List<Boolean> insert(K name, redis.clients.jedis.bloom.BFInsertParams options, String... items)
      Description copied from interface: BloomOperations
      add one or more items to the bloom filter, by default creating it if it does not yet exist
      Specified by:
      insert in interface BloomOperations<K>
      Parameters:
      name - The name of the filter
      options - BFInsertParams
      items - items to add to the filter
      Returns:
      array of booleans, true for each succesful insertion
    • addMulti

      public List<Boolean> addMulti(K name, String... values)
      Description copied from interface: BloomOperations
      Add one or more items to a filter
      Specified by:
      addMulti in interface BloomOperations<K>
      Parameters:
      name - Name of the filter
      values - values to add to the filter.
      Returns:
      An array of booleans of the same length as the number of values. Each boolean values indicates whether the corresponding element was previously in the filter or not. A true value means the item did not previously exist, whereas a false value means it may have previously existed.
    • exists

      public boolean exists(K name, String value)
      Description copied from interface: BloomOperations
      Check if an item exists in the filter
      Specified by:
      exists in interface BloomOperations<K>
      Parameters:
      name - Name (key) of the filter
      value - Value to check for
      Returns:
      true if the item may exist in the filter, false if the item does not exist in the filter
    • existsMulti

      public List<Boolean> existsMulti(K name, String... values)
      Description copied from interface: BloomOperations
      Check if one or more items exist in the filter
      Specified by:
      existsMulti in interface BloomOperations<K>
      Parameters:
      name - Name of the filter to check
      values - values to check for
      Returns:
      An array of booleans. A true value means the corresponding value may exist, false means it does not exist
    • info

      public Map<String,Object> info(K name)
      Description copied from interface: BloomOperations
      Get information about the filter
      Specified by:
      info in interface BloomOperations<K>
      Parameters:
      name - the name of the filter
      Returns:
      Return information