Class BloomFilter (3.12.1)

public final class BloomFilter extends GeneratedMessageV3 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 Fields

BITS_FIELD_NUMBER

public static final int BITS_FIELD_NUMBER
Field Value
TypeDescription
int

HASH_COUNT_FIELD_NUMBER

public static final int HASH_COUNT_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static BloomFilter getDefaultInstance()
Returns
TypeDescription
BloomFilter

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static BloomFilter.Builder newBuilder()
Returns
TypeDescription
BloomFilter.Builder

newBuilder(BloomFilter prototype)

public static BloomFilter.Builder newBuilder(BloomFilter prototype)
Parameter
NameDescription
prototypeBloomFilter
Returns
TypeDescription
BloomFilter.Builder

parseDelimitedFrom(InputStream input)

public static BloomFilter parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
BloomFilter
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static BloomFilter parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
BloomFilter
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static BloomFilter parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
BloomFilter
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static BloomFilter parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
BloomFilter
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static BloomFilter parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
BloomFilter
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static BloomFilter parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
BloomFilter
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static BloomFilter parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
BloomFilter
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static BloomFilter parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
BloomFilter
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static BloomFilter parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
BloomFilter
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static BloomFilter parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
BloomFilter
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static BloomFilter parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
BloomFilter
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static BloomFilter parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
BloomFilter
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<BloomFilter> parser()
Returns
TypeDescription
Parser<BloomFilter>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getBits()

public BitSequence getBits()

The bloom filter data.

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

Returns
TypeDescription
BitSequence

The bits.

getBitsOrBuilder()

public BitSequenceOrBuilder getBitsOrBuilder()

The bloom filter data.

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

Returns
TypeDescription
BitSequenceOrBuilder

getDefaultInstanceForType()

public BloomFilter getDefaultInstanceForType()
Returns
TypeDescription
BloomFilter

getHashCount()

public int getHashCount()

The number of hashes used by the algorithm.

int32 hash_count = 2;

Returns
TypeDescription
int

The hashCount.

getParserForType()

public Parser<BloomFilter> getParserForType()
Returns
TypeDescription
Parser<BloomFilter>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

hasBits()

public boolean hasBits()

The bloom filter data.

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

Returns
TypeDescription
boolean

Whether the bits field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public BloomFilter.Builder newBuilderForType()
Returns
TypeDescription
BloomFilter.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected BloomFilter.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
BloomFilter.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public BloomFilter.Builder toBuilder()
Returns
TypeDescription
BloomFilter.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException