public class HyperLogLogMergePolicy extends com.hazelcast.spi.impl.merge.AbstractSplitBrainMergePolicy<com.hazelcast.cardinality.impl.hyperloglog.HyperLogLog,SplitBrainMergeTypes.CardinalityEstimatorMergeTypes,com.hazelcast.cardinality.impl.hyperloglog.HyperLogLog>
CardinalityEstimator
.
Uses the default merge algorithm from HyperLogLog research, keeping the max register value of the two given instances. The result should be the union to the two HyperLogLog estimations.
Constructor and Description |
---|
HyperLogLogMergePolicy() |
Modifier and Type | Method and Description |
---|---|
int |
getClassId()
Returns type identifier for this class.
|
com.hazelcast.cardinality.impl.hyperloglog.HyperLogLog |
merge(SplitBrainMergeTypes.CardinalityEstimatorMergeTypes mergingValue,
SplitBrainMergeTypes.CardinalityEstimatorMergeTypes existingValue)
Selects the value of either the merging or the
existing
MergingValue which should be merged. |
public com.hazelcast.cardinality.impl.hyperloglog.HyperLogLog merge(SplitBrainMergeTypes.CardinalityEstimatorMergeTypes mergingValue, SplitBrainMergeTypes.CardinalityEstimatorMergeTypes existingValue)
SplitBrainMergePolicy
MergingValue
which should be merged.
Note that the existing MergingValue
instance may be null
if no matching data could be found to the merging MergingValue
.
mergingValue
- MergingValue
instance that has the
merging data of the smaller sub-clusterexistingValue
- MergingValue
instance that has the existing
data or null
if no matching data existspublic int getClassId()
IdentifiedDataSerializable
Copyright © 2020 Hazelcast, Inc.. All rights reserved.