Package com.hazelcast.config
Class CardinalityEstimatorConfig
java.lang.Object
com.hazelcast.config.CardinalityEstimatorConfig
- All Implemented Interfaces:
NamedConfig,DataSerializable,IdentifiedDataSerializable
public class CardinalityEstimatorConfig
extends Object
implements IdentifiedDataSerializable, NamedConfig
Configuration options for the
CardinalityEstimator-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe number of async backups per estimatorstatic final MergePolicyConfigThe default merge policy used for cardinality estimatorsstatic final intThe number of sync backups per estimator -
Constructor Summary
ConstructorsConstructorDescriptionCardinalityEstimatorConfig(String name, int backupCount, int asyncBackupCount) CardinalityEstimatorConfig(String name, int backupCount, int asyncBackupCount, MergePolicyConfig mergePolicyConfig) CardinalityEstimatorConfig(String name, int backupCount, int asyncBackupCount, String splitBrainProtectionName, MergePolicyConfig mergePolicyConfig) -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanintGets the number of synchronous backups.intGets the number of synchronous backups.intReturns type identifier for this class.intReturns DataSerializableFactory factory ID for this class.Gets theMergePolicyConfigfor the cardinality estimator.getName()Gets the name of the cardinality estimator.Returns the split brain protection name for operations.intReturns the total number of backups: backupCount plus asyncBackupCount.final inthashCode()voidReads fields from the input streamsetAsyncBackupCount(int asyncBackupCount) Sets the number of synchronous backups.setBackupCount(int backupCount) Sets the number of synchronous backups.setMergePolicyConfig(MergePolicyConfig mergePolicyConfig) Sets theMergePolicyConfigfor the scheduler.Sets the name of the cardinality estimator.setSplitBrainProtectionName(String splitBrainProtectionName) Sets the split brain protection name for operations.toString()final voidvalidate()voidWrites object fields to output stream
-
Field Details
-
DEFAULT_SYNC_BACKUP_COUNT
public static final int DEFAULT_SYNC_BACKUP_COUNTThe number of sync backups per estimator- See Also:
-
DEFAULT_ASYNC_BACKUP_COUNT
public static final int DEFAULT_ASYNC_BACKUP_COUNTThe number of async backups per estimator- See Also:
-
DEFAULT_MERGE_POLICY_CONFIG
The default merge policy used for cardinality estimators
-
-
Constructor Details
-
CardinalityEstimatorConfig
public CardinalityEstimatorConfig() -
CardinalityEstimatorConfig
-
CardinalityEstimatorConfig
-
CardinalityEstimatorConfig
public CardinalityEstimatorConfig(String name, int backupCount, int asyncBackupCount, MergePolicyConfig mergePolicyConfig) -
CardinalityEstimatorConfig
public CardinalityEstimatorConfig(String name, int backupCount, int asyncBackupCount, String splitBrainProtectionName, MergePolicyConfig mergePolicyConfig) -
CardinalityEstimatorConfig
-
-
Method Details
-
getName
Gets the name of the cardinality estimator.- Specified by:
getNamein interfaceNamedConfig- Returns:
- the name of the estimator
-
setName
Sets the name of the cardinality estimator.- Specified by:
setNamein interfaceNamedConfig- Parameters:
name- the name of the estimator- Returns:
- the cardinality estimator config instance
-
getMergePolicyConfig
Gets theMergePolicyConfigfor the cardinality estimator.- Returns:
- the
MergePolicyConfigfor the cardinality estimator
-
setMergePolicyConfig
Sets theMergePolicyConfigfor the scheduler.- Returns:
- this executor config instance
-
getBackupCount
public int getBackupCount()Gets the number of synchronous backups.- Returns:
- number of synchronous backups
-
setBackupCount
Sets the number of synchronous backups.- Parameters:
backupCount- the number of synchronous backups to set- Returns:
- the updated CardinalityEstimatorConfig
- Throws:
IllegalArgumentException- 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 backups- See Also:
-
getAsyncBackupCount
public int getAsyncBackupCount()Gets the number of synchronous backups.- Returns:
- number of synchronous backups
-
setAsyncBackupCount
Sets the number of synchronous backups.- Parameters:
asyncBackupCount- the number of synchronous backups to set- Returns:
- the updated CardinalityEstimatorConfig
- Throws:
IllegalArgumentException- 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 backups- See Also:
-
getTotalBackupCount
public int getTotalBackupCount()Returns the total number of backups: backupCount plus asyncBackupCount.- Returns:
- the total number of backups: backupCount plus asyncBackupCount
-
getSplitBrainProtectionName
Returns the split brain protection name for operations.- Returns:
- the split brain protection name
-
setSplitBrainProtectionName
Sets the split brain protection name for operations.- Parameters:
splitBrainProtectionName- the split brain protection name- Returns:
- the updated configuration
-
toString
-
getFactoryId
public int getFactoryId()Description copied from interface:IdentifiedDataSerializableReturns DataSerializableFactory factory ID for this class.- Specified by:
getFactoryIdin interfaceIdentifiedDataSerializable- Returns:
- factory ID
-
getClassId
public int getClassId()Description copied from interface:IdentifiedDataSerializableReturns type identifier for this class. It should be unique per DataSerializableFactory.- Specified by:
getClassIdin interfaceIdentifiedDataSerializable- Returns:
- type ID
-
writeData
Description copied from interface:DataSerializableWrites object fields to output stream- Specified by:
writeDatain interfaceDataSerializable- Parameters:
out- output- Throws:
IOException- if an I/O error occurs. In particular, anIOExceptionmay be thrown if the output stream has been closed.
-
readData
Description copied from interface:DataSerializableReads fields from the input stream- Specified by:
readDatain interfaceDataSerializable- Parameters:
in- input- Throws:
IOException- if an I/O error occurs. In particular, anIOExceptionmay be thrown if the input stream has been closed.
-
equals
-
hashCode
public final int hashCode() -
validate
public final void validate()
-