Class BloomFilter.Builder (3.21.4)

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

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public BloomFilter.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
BloomFilter.Builder
Overrides

build()

public BloomFilter build()
Returns
Type Description
BloomFilter

buildPartial()

public BloomFilter buildPartial()
Returns
Type Description
BloomFilter

clear()

public BloomFilter.Builder clear()
Returns
Type Description
BloomFilter.Builder
Overrides

clearBits()

public BloomFilter.Builder clearBits()

The bloom filter data.

.google.firestore.v1.BitSequence bits = 1;

Returns
Type Description
BloomFilter.Builder

clearField(Descriptors.FieldDescriptor field)

public BloomFilter.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
BloomFilter.Builder
Overrides

clearHashCount()

public BloomFilter.Builder clearHashCount()

The number of hashes used by the algorithm.

int32 hash_count = 2;

Returns
Type Description
BloomFilter.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public BloomFilter.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
BloomFilter.Builder
Overrides

clone()

public BloomFilter.Builder clone()
Returns
Type Description
BloomFilter.Builder
Overrides

getBits()

public BitSequence getBits()

The bloom filter data.

.google.firestore.v1.BitSequence bits = 1;

Returns
Type Description
BitSequence

The bits.

getBitsBuilder()

public BitSequence.Builder getBitsBuilder()

The bloom filter data.

.google.firestore.v1.BitSequence bits = 1;

Returns
Type Description
BitSequence.Builder

getBitsOrBuilder()

public BitSequenceOrBuilder getBitsOrBuilder()

The bloom filter data.

.google.firestore.v1.BitSequence bits = 1;

Returns
Type Description
BitSequenceOrBuilder

getDefaultInstanceForType()

public BloomFilter getDefaultInstanceForType()
Returns
Type Description
BloomFilter

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getHashCount()

public int getHashCount()

The number of hashes used by the algorithm.

int32 hash_count = 2;

Returns
Type Description
int

The hashCount.

hasBits()

public boolean 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()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeBits(BitSequence value)

public BloomFilter.Builder mergeBits(BitSequence value)

The bloom filter data.

.google.firestore.v1.BitSequence bits = 1;

Parameter
Name Description
value BitSequence
Returns
Type Description
BloomFilter.Builder

mergeFrom(BloomFilter other)

public BloomFilter.Builder mergeFrom(BloomFilter other)
Parameter
Name Description
other BloomFilter
Returns
Type Description
BloomFilter.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public BloomFilter.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
BloomFilter.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public BloomFilter.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
BloomFilter.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final BloomFilter.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
BloomFilter.Builder
Overrides

setBits(BitSequence value)

public BloomFilter.Builder setBits(BitSequence value)

The bloom filter data.

.google.firestore.v1.BitSequence bits = 1;

Parameter
Name Description
value BitSequence
Returns
Type Description
BloomFilter.Builder

setBits(BitSequence.Builder builderForValue)

public BloomFilter.Builder setBits(BitSequence.Builder builderForValue)

The bloom filter data.

.google.firestore.v1.BitSequence bits = 1;

Parameter
Name Description
builderForValue BitSequence.Builder
Returns
Type Description
BloomFilter.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public BloomFilter.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
BloomFilter.Builder
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.

Returns
Type Description
BloomFilter.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public BloomFilter.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
BloomFilter.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final BloomFilter.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
BloomFilter.Builder
Overrides