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()
HyperLogLogestimate in interface HyperLogLogpublic void add(long hash)
HyperLogLogadd in interface HyperLogLoghash - the value to aggregatepublic void addAll(long[] hashes)
HyperLogLogaddAll in interface HyperLogLoghashes - the hash values array to aggregatepublic int getFactoryId()
IdentifiedDataSerializablegetFactoryId in interface IdentifiedDataSerializablepublic int getId()
IdentifiedDataSerializablegetId in interface IdentifiedDataSerializablepublic void writeData(ObjectDataOutput out) throws IOException
DataSerializablewriteData in interface DataSerializableout - outputIOExceptionpublic void readData(ObjectDataInput in) throws IOException
DataSerializablereadData in interface DataSerializablein - inputIOExceptionCopyright © 2017 Hazelcast, Inc.. All Rights Reserved.