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 -
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(byte fingerprint, long hash, int maxIterations) booleancontains(byte fingerprint, long hash) Checking only i1 and i2 is sufficient because altIndex is its own inverse: altIndex(altIndex(i, fp), fp) == i.longcount(byte fingerprint, long hash) booleandelete(byte fingerprint, long hash) byte[]intlonglongbooleantryInsert(byte fingerprint, long hash) Try direct insertion without eviction.
-
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)
-