public static final class BloomFilter.Builder extends GeneratedMessageV3.Builder<BloomFilter.Builder> implements BloomFilterOrBuilder
A bloom filter (https://en.wikipedia.org/wiki/Bloom_filter).
The bloom filter hashes the entries with MD5 and treats the resulting 128-bit
hash as 2 distinct 64-bit hash values, interpreted as unsigned integers
using 2's complement encoding.
These two hash values, named h1
and h2
, are then used to compute the
hash_count
hash values using the formula, starting at i=0
:
h(i) = h1 + (i * h2)
These resulting values are then taken modulo the number of bits in the bloom
filter to get the bits of the bloom filter to test for the given entry.
Protobuf type google.firestore.v1.BloomFilter
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public BloomFilter.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Overrides
build()
public BloomFilter build()
buildPartial()
public BloomFilter buildPartial()
clear()
public BloomFilter.Builder clear()
Overrides
clearBits()
public BloomFilter.Builder clearBits()
The bloom filter data.
.google.firestore.v1.BitSequence bits = 1;
clearField(Descriptors.FieldDescriptor field)
public BloomFilter.Builder clearField(Descriptors.FieldDescriptor field)
Overrides
clearHashCount()
public BloomFilter.Builder clearHashCount()
The number of hashes used by the algorithm.
int32 hash_count = 2;
clearOneof(Descriptors.OneofDescriptor oneof)
public BloomFilter.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Overrides
clone()
public BloomFilter.Builder clone()
Overrides
getBits()
public BitSequence getBits()
The bloom filter data.
.google.firestore.v1.BitSequence bits = 1;
getBitsBuilder()
public BitSequence.Builder getBitsBuilder()
The bloom filter data.
.google.firestore.v1.BitSequence bits = 1;
getBitsOrBuilder()
public BitSequenceOrBuilder getBitsOrBuilder()
The bloom filter data.
.google.firestore.v1.BitSequence bits = 1;
getDefaultInstanceForType()
public BloomFilter getDefaultInstanceForType()
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Overrides
getHashCount()
public int getHashCount()
The number of hashes used by the algorithm.
int32 hash_count = 2;
Returns |
---|
Type | Description |
int | The hashCount.
|
hasBits()
The bloom filter data.
.google.firestore.v1.BitSequence bits = 1;
Returns |
---|
Type | Description |
boolean | Whether the bits field is set.
|
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
mergeBits(BitSequence value)
public BloomFilter.Builder mergeBits(BitSequence value)
The bloom filter data.
.google.firestore.v1.BitSequence bits = 1;
mergeFrom(BloomFilter other)
public BloomFilter.Builder mergeFrom(BloomFilter other)
public BloomFilter.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Overrides
mergeFrom(Message other)
public BloomFilter.Builder mergeFrom(Message other)
Parameter |
---|
Name | Description |
other | Message
|
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final BloomFilter.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Overrides
setBits(BitSequence value)
public BloomFilter.Builder setBits(BitSequence value)
The bloom filter data.
.google.firestore.v1.BitSequence bits = 1;
setBits(BitSequence.Builder builderForValue)
public BloomFilter.Builder setBits(BitSequence.Builder builderForValue)
The bloom filter data.
.google.firestore.v1.BitSequence bits = 1;
setField(Descriptors.FieldDescriptor field, Object value)
public BloomFilter.Builder setField(Descriptors.FieldDescriptor field, Object value)
Overrides
setHashCount(int value)
public BloomFilter.Builder setHashCount(int value)
The number of hashes used by the algorithm.
int32 hash_count = 2;
Parameter |
---|
Name | Description |
value | int
The hashCount to set.
|
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public BloomFilter.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final BloomFilter.Builder setUnknownFields(UnknownFieldSet unknownFields)
Overrides