Class BloomFilter.Builder
-
- All Implemented Interfaces:
-
org.apache.avro.data.RecordBuilder
public class BloomFilter.Builder extends SpecificRecordBuilderBase<T> implements RecordBuilder<T>
RecordBuilder for BloomFilter instances.
-
-
Field Summary
Fields Modifier and Type Field Description public int
numberOfHashFunctions
public int
hashSeed
public int
filterLength
public ByteBuffer
filterBits
-
Method Summary
Modifier and Type Method Description int
getNumberOfHashFunctions()
Gets the value of the 'numberOfHashFunctions' field. BloomFilter.Builder
setNumberOfHashFunctions(int value)
Sets the value of the 'numberOfHashFunctions' field. int
getHashSeed()
Gets the value of the 'hashSeed' field. BloomFilter.Builder
setHashSeed(int value)
Sets the value of the 'hashSeed' field. int
getFilterLength()
Gets the value of the 'filterLength' field. BloomFilter.Builder
setFilterLength(int value)
Sets the value of the 'filterLength' field. ByteBuffer
getFilterBits()
Gets the value of the 'filterBits' field. BloomFilter.Builder
setFilterBits(ByteBuffer value)
Sets the value of the 'filterBits' field. boolean
hasNumberOfHashFunctions()
Checks whether the 'numberOfHashFunctions' field has been set. BloomFilter.Builder
clearNumberOfHashFunctions()
Clears the value of the 'numberOfHashFunctions' field. boolean
hasHashSeed()
Checks whether the 'hashSeed' field has been set. BloomFilter.Builder
clearHashSeed()
Clears the value of the 'hashSeed' field. boolean
hasFilterLength()
Checks whether the 'filterLength' field has been set. BloomFilter.Builder
clearFilterLength()
Clears the value of the 'filterLength' field. boolean
hasFilterBits()
Checks whether the 'filterBits' field has been set. BloomFilter.Builder
clearFilterBits()
Clears the value of the 'filterBits' field. BloomFilter
build()
-
-
Method Detail
-
getNumberOfHashFunctions
int getNumberOfHashFunctions()
Gets the value of the 'numberOfHashFunctions' field. The number of the hash functions.
-
setNumberOfHashFunctions
BloomFilter.Builder setNumberOfHashFunctions(int value)
Sets the value of the 'numberOfHashFunctions' field. The number of the hash functions.
- Parameters:
value
- The value of 'numberOfHashFunctions'.
-
getHashSeed
int getHashSeed()
Gets the value of the 'hashSeed' field. The seed of the filter used for calculating the hashes, must change after each round.
-
setHashSeed
BloomFilter.Builder setHashSeed(int value)
Sets the value of the 'hashSeed' field. The seed of the filter used for calculating the hashes, must change after each round.
- Parameters:
value
- The value of 'hashSeed'.
-
getFilterLength
int getFilterLength()
Gets the value of the 'filterLength' field. The length of the filter and size of the filterBits.
-
setFilterLength
BloomFilter.Builder setFilterLength(int value)
Sets the value of the 'filterLength' field. The length of the filter and size of the filterBits.
- Parameters:
value
- The value of 'filterLength'.
-
getFilterBits
ByteBuffer getFilterBits()
Gets the value of the 'filterBits' field. ByteArray representation of the members present in the filter.
-
setFilterBits
BloomFilter.Builder setFilterBits(ByteBuffer value)
Sets the value of the 'filterBits' field. ByteArray representation of the members present in the filter.
- Parameters:
value
- The value of 'filterBits'.
-
hasNumberOfHashFunctions
boolean hasNumberOfHashFunctions()
Checks whether the 'numberOfHashFunctions' field has been set. The number of the hash functions.
-
clearNumberOfHashFunctions
BloomFilter.Builder clearNumberOfHashFunctions()
Clears the value of the 'numberOfHashFunctions' field. The number of the hash functions.
-
hasHashSeed
boolean hasHashSeed()
Checks whether the 'hashSeed' field has been set. The seed of the filter used for calculating the hashes, must change after each round.
-
clearHashSeed
BloomFilter.Builder clearHashSeed()
Clears the value of the 'hashSeed' field. The seed of the filter used for calculating the hashes, must change after each round.
-
hasFilterLength
boolean hasFilterLength()
Checks whether the 'filterLength' field has been set. The length of the filter and size of the filterBits.
-
clearFilterLength
BloomFilter.Builder clearFilterLength()
Clears the value of the 'filterLength' field. The length of the filter and size of the filterBits.
-
hasFilterBits
boolean hasFilterBits()
Checks whether the 'filterBits' field has been set. ByteArray representation of the members present in the filter.
-
clearFilterBits
BloomFilter.Builder clearFilterBits()
Clears the value of the 'filterBits' field. ByteArray representation of the members present in the filter.
-
build
BloomFilter build()
-
-
-
-