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 Details

    • DEFAULT_SYNC_BACKUP_COUNT

      public static final int DEFAULT_SYNC_BACKUP_COUNT
      The number of sync backups per estimator
      See Also:
      Constant Field Values
    • DEFAULT_ASYNC_BACKUP_COUNT

      public static final int DEFAULT_ASYNC_BACKUP_COUNT
      The number of async backups per estimator
      See Also:
      Constant Field Values
    • DEFAULT_MERGE_POLICY_CONFIG

      public static final MergePolicyConfig DEFAULT_MERGE_POLICY_CONFIG
      The default merge policy used for cardinality estimators
  • Constructor Details

    • CardinalityEstimatorConfig

      public CardinalityEstimatorConfig()
    • CardinalityEstimatorConfig

      public CardinalityEstimatorConfig​(String name)
    • CardinalityEstimatorConfig

      public CardinalityEstimatorConfig​(String name, int backupCount, int asyncBackupCount)
    • 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

      public CardinalityEstimatorConfig​(CardinalityEstimatorConfig config)
  • Method Details

    • getName

      public String getName()
      Gets the name of the cardinality estimator.
      Specified by:
      getName in interface NamedConfig
      Returns:
      the name of the estimator
    • setName

      public CardinalityEstimatorConfig setName​(String name)
      Sets the name of the cardinality estimator.
      Specified by:
      setName in interface NamedConfig
      Parameters:
      name - the name of the estimator
      Returns:
      the cardinality estimator config instance
    • getMergePolicyConfig

      public MergePolicyConfig getMergePolicyConfig()
      Gets the MergePolicyConfig for the cardinality estimator.
      Returns:
      the MergePolicyConfig for the cardinality estimator
    • setMergePolicyConfig

      public CardinalityEstimatorConfig setMergePolicyConfig​(MergePolicyConfig mergePolicyConfig)
      Sets the MergePolicyConfig for the scheduler.
      Returns:
      this executor config instance
    • getBackupCount

      public int getBackupCount()
      Gets the number of synchronous backups.
      Returns:
      number of synchronous backups
    • setBackupCount

      public CardinalityEstimatorConfig setBackupCount​(int backupCount)
      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:
      setAsyncBackupCount(int), getBackupCount()
    • getAsyncBackupCount

      public int getAsyncBackupCount()
      Gets the number of synchronous backups.
      Returns:
      number of synchronous backups
    • setAsyncBackupCount

      public CardinalityEstimatorConfig setAsyncBackupCount​(int asyncBackupCount)
      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:
      setAsyncBackupCount(int), getBackupCount()
    • getTotalBackupCount

      public int getTotalBackupCount()
      Returns the total number of backups: backupCount plus asyncBackupCount.
      Returns:
      the total number of backups: backupCount plus asyncBackupCount
    • getSplitBrainProtectionName

      public String getSplitBrainProtectionName()
      Returns the split brain protection name for operations.
      Returns:
      the split brain protection name
    • setSplitBrainProtectionName

      public CardinalityEstimatorConfig setSplitBrainProtectionName​(String splitBrainProtectionName)
      Sets the split brain protection name for operations.
      Parameters:
      splitBrainProtectionName - the split brain protection name
      Returns:
      the updated configuration
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getFactoryId

      public int getFactoryId()
      Description copied from interface: IdentifiedDataSerializable
      Returns DataSerializableFactory factory ID for this class.
      Specified by:
      getFactoryId in interface IdentifiedDataSerializable
      Returns:
      factory ID
    • getClassId

      public int getClassId()
      Description copied from interface: IdentifiedDataSerializable
      Returns type identifier for this class. It should be unique per DataSerializableFactory.
      Specified by:
      getClassId in interface IdentifiedDataSerializable
      Returns:
      type ID
    • writeData

      public void writeData​(ObjectDataOutput out) throws IOException
      Description copied from interface: DataSerializable
      Writes object fields to output stream
      Specified by:
      writeData in interface DataSerializable
      Parameters:
      out - output
      Throws:
      IOException - if an I/O error occurs. In particular, an IOException may be thrown if the output stream has been closed.
    • readData

      public void readData​(ObjectDataInput in) throws IOException
      Description copied from interface: DataSerializable
      Reads fields from the input stream
      Specified by:
      readData in interface DataSerializable
      Parameters:
      in - input
      Throws:
      IOException - if an I/O error occurs. In particular, an IOException may be thrown if the input stream has been closed.
    • equals

      public final boolean equals​(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • validate

      public final void validate()