Class CuckooFilter.SubFilter

java.lang.Object
org.infinispan.server.resp.commands.cuckoo.CuckooFilter.SubFilter
Enclosing class:
CuckooFilter

@ProtoTypeId(6145) @ProtoName("CuckooSubFilter") public static final class CuckooFilter.SubFilter extends Object
A sub-filter in a scalable Cuckoo filter.
Since:
16.2
  • Constructor Summary

    Constructors
    Constructor
    Description
    SubFilter(long numBuckets, int bucketSize)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    add(byte fingerprint, long hash, int maxIterations)
     
    boolean
    contains(byte fingerprint, long hash)
    Checking only i1 and i2 is sufficient because altIndex is its own inverse: altIndex(altIndex(i, fp), fp) == i.
    long
    count(byte fingerprint, long hash)
     
    boolean
    delete(byte fingerprint, long hash)
     
    byte[]
     
    int
     
    long
     
    long
     
    boolean
    tryInsert(byte fingerprint, long hash)
    Try direct insertion without eviction.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SubFilter

      public SubFilter(long numBuckets, int bucketSize)
  • Method Details

    • getNumBuckets

      @ProtoField(number=1, defaultValue="1024") public long getNumBuckets()
    • getBucketSize

      @ProtoField(number=2, defaultValue="2") public int getBucketSize()
    • getBuckets

      @ProtoField(number=3) public byte[] getBuckets()
    • getSizeInBytes

      public long getSizeInBytes()
    • tryInsert

      public boolean tryInsert(byte fingerprint, long hash)
      Try direct insertion without eviction.
    • add

      public boolean add(byte fingerprint, long hash, int maxIterations)
    • contains

      public boolean contains(byte fingerprint, long hash)
      Checking only i1 and i2 is sufficient because altIndex is its own inverse: altIndex(altIndex(i, fp), fp) == i. Even after eviction chains, every item remains in one of its two candidate buckets.
    • count

      public long count(byte fingerprint, long hash)
    • delete

      public boolean delete(byte fingerprint, long hash)