public class CardinalityEstimatorConfig extends Object implements IdentifiedDataSerializable
CardinalityEstimator
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_ASYNC_BACKUP_COUNT
The number of async backups per estimator
|
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) |
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.
|
String |
getName()
Gets the name of the cardinality estimator.
|
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 |
setName(String name)
Sets the name of the cardinality estimator.
|
String |
toString() |
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 CardinalityEstimatorConfig()
public CardinalityEstimatorConfig(String name)
public CardinalityEstimatorConfig(String name, int backupCount, int asyncBackupCount)
public CardinalityEstimatorConfig(CardinalityEstimatorConfig config)
public String getName()
public CardinalityEstimatorConfig setName(String name)
name
- the name of the estimatorpublic 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 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 © 2017 Hazelcast, Inc.. All Rights Reserved.