public class CardinalityEstimatorConfig extends Object implements IdentifiedDataSerializable, com.hazelcast.nio.serialization.impl.Versioned
CardinalityEstimator
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_ASYNC_BACKUP_COUNT
The number of async backups per estimator
|
static MergePolicyConfig |
DEFAULT_MERGE_POLICY_CONFIG
The default merge policy used for cardinality estimators
|
static int |
DEFAULT_SYNC_BACKUP_COUNT
The number of sync backups per estimator
|
Constructor and Description |
---|
CardinalityEstimatorConfig() |
CardinalityEstimatorConfig(CardinalityEstimatorConfig config) |
CardinalityEstimatorConfig(String name) |
CardinalityEstimatorConfig(String name,
int backupCount,
int asyncBackupCount) |
CardinalityEstimatorConfig(String name,
int backupCount,
int asyncBackupCount,
MergePolicyConfig mergePolicyConfig) |
CardinalityEstimatorConfig(String name,
int backupCount,
int asyncBackupCount,
String quorumName,
MergePolicyConfig mergePolicyConfig) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
int |
getAsyncBackupCount()
Gets the number of synchronous backups.
|
int |
getBackupCount()
Gets the number of synchronous backups.
|
int |
getFactoryId()
Returns DataSerializableFactory factory ID for this class.
|
int |
getId()
Returns type identifier for this class.
|
MergePolicyConfig |
getMergePolicyConfig()
Gets the
MergePolicyConfig for the cardinality estimator. |
String |
getName()
Gets the name of the cardinality estimator.
|
String |
getQuorumName()
Returns the quorum name for operations.
|
int |
getTotalBackupCount()
Returns the total number of backups: backupCount plus asyncBackupCount.
|
int |
hashCode() |
void |
readData(ObjectDataInput in)
Reads fields from the input stream
|
CardinalityEstimatorConfig |
setAsyncBackupCount(int asyncBackupCount)
Sets the number of synchronous backups.
|
CardinalityEstimatorConfig |
setBackupCount(int backupCount)
Sets the number of synchronous backups.
|
CardinalityEstimatorConfig |
setMergePolicyConfig(MergePolicyConfig mergePolicyConfig)
Sets the
MergePolicyConfig for the scheduler. |
CardinalityEstimatorConfig |
setName(String name)
Sets the name of the cardinality estimator.
|
CardinalityEstimatorConfig |
setQuorumName(String quorumName)
Sets the quorum name for operations.
|
String |
toString() |
void |
validate() |
void |
writeData(ObjectDataOutput out)
Writes object fields to output stream
|
public static final int DEFAULT_SYNC_BACKUP_COUNT
public static final int DEFAULT_ASYNC_BACKUP_COUNT
public static final MergePolicyConfig DEFAULT_MERGE_POLICY_CONFIG
public CardinalityEstimatorConfig()
public CardinalityEstimatorConfig(String name)
public CardinalityEstimatorConfig(String name, int backupCount, int asyncBackupCount)
public CardinalityEstimatorConfig(String name, int backupCount, int asyncBackupCount, MergePolicyConfig mergePolicyConfig)
public CardinalityEstimatorConfig(String name, int backupCount, int asyncBackupCount, String quorumName, MergePolicyConfig mergePolicyConfig)
public CardinalityEstimatorConfig(CardinalityEstimatorConfig config)
public String getName()
public CardinalityEstimatorConfig setName(String name)
name
- the name of the estimatorpublic MergePolicyConfig getMergePolicyConfig()
MergePolicyConfig
for the cardinality estimator.MergePolicyConfig
for the cardinality estimatorpublic CardinalityEstimatorConfig setMergePolicyConfig(MergePolicyConfig mergePolicyConfig)
MergePolicyConfig
for the scheduler.public int getBackupCount()
public CardinalityEstimatorConfig setBackupCount(int backupCount)
backupCount
- the number of synchronous backups to setIllegalArgumentException
- if backupCount smaller than 0,
or larger than the maximum number of backup
or the sum of the backups and async backups is larger than the maximum number of backupssetAsyncBackupCount(int)
,
getBackupCount()
public int getAsyncBackupCount()
public CardinalityEstimatorConfig setAsyncBackupCount(int asyncBackupCount)
asyncBackupCount
- the number of synchronous backups to setIllegalArgumentException
- if backupCount smaller than 0,
or larger than the maximum number of backup
or the sum of the backups and async backups is larger than the maximum number of backupssetAsyncBackupCount(int)
,
getBackupCount()
public int getTotalBackupCount()
public String getQuorumName()
public CardinalityEstimatorConfig setQuorumName(String quorumName)
quorumName
- the quorum namepublic 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
- if an I/O error occurs. In particular,
an IOException
may be thrown if the
output stream has been closed.public void readData(ObjectDataInput in) throws IOException
DataSerializable
readData
in interface DataSerializable
in
- inputIOException
- if an I/O error occurs. In particular,
an IOException
may be thrown if the
input stream has been closed.public final void validate()
Copyright © 2018 Hazelcast, Inc.. All rights reserved.