public class CardinalityEstimatorConfig extends Object implements IdentifiedDataSerializable, Versioned
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) |
CardinalityEstimatorConfig(String name,
int backupCount,
int asyncBackupCount,
String quorumName) |
| 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.
|
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 |
setName(String name)
Sets the name of the cardinality estimator.
|
CardinalityEstimatorConfig |
setQuorumName(String quorumName)
Sets the quorum name for operations.
|
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(String name, int backupCount, int asyncBackupCount, String quorumName)
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 String getQuorumName()
public CardinalityEstimatorConfig setQuorumName(String quorumName)
quorumName - the quorum namepublic int getFactoryId()
IdentifiedDataSerializablegetFactoryId in interface IdentifiedDataSerializablepublic int getId()
IdentifiedDataSerializablegetId in interface IdentifiedDataSerializablepublic void writeData(ObjectDataOutput out) throws IOException
DataSerializablewriteData in interface DataSerializableout - 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
DataSerializablereadData in interface DataSerializablein - inputIOException - if an I/O error occurs. In particular,
an IOException may be thrown if the
input stream has been closed.Copyright © 2018. All Rights Reserved.