public class HyperLogLogImpl extends Object implements HyperLogLog
Constructor and Description |
---|
HyperLogLogImpl() |
HyperLogLogImpl(int p,
int pPrime) |
Modifier and Type | Method and Description |
---|---|
void |
add(long hash)
Aggregates the hash in the HyperLogLog registers.
|
void |
addAll(long[] hashes)
Batch aggregation of hash values in the HyperLogLog registers.
|
long |
estimate()
Computes a new estimate for the current status of the registers.
|
int |
getFactoryId()
Returns DataSerializableFactory factory ID for this class.
|
int |
getId()
Returns type identifier for this class.
|
void |
readData(ObjectDataInput in)
Reads fields from the input stream
|
void |
writeData(ObjectDataOutput out)
Writes object fields to output stream
|
public HyperLogLogImpl()
public HyperLogLogImpl(int p, int pPrime)
public long estimate()
HyperLogLog
estimate
in interface HyperLogLog
public void add(long hash)
HyperLogLog
add
in interface HyperLogLog
hash
- the value to aggregatepublic void addAll(long[] hashes)
HyperLogLog
addAll
in interface HyperLogLog
hashes
- the hash values array to aggregatepublic int getFactoryId()
IdentifiedDataSerializable
getFactoryId
in interface IdentifiedDataSerializable
public int getId()
IdentifiedDataSerializable
getId
in interface IdentifiedDataSerializable
public void writeData(ObjectDataOutput out) throws IOException
DataSerializable
writeData
in interface DataSerializable
out
- outputIOException
public void readData(ObjectDataInput in) throws IOException
DataSerializable
readData
in interface DataSerializable
in
- inputIOException
Copyright © 2018 Hazelcast, Inc.. All Rights Reserved.