com.hazelcast.config

## Class CardinalityEstimatorConfig

- java.lang.Object
- - com.hazelcast.config.CardinalityEstimatorConfig

- All Implemented Interfaces:
    NamedConfig, DataSerializable, IdentifiedDataSerializable, com.hazelcast.nio.serialization.impl.Versioned

      public class CardinalityEstimatorConfig
      extends Object
      implements IdentifiedDataSerializable, com.hazelcast.nio.serialization.impl.Versioned, NamedConfig

  Configuration options for the `CardinalityEstimator`

- - ### Field Summary

    Fields
    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 Summary

    Constructors
    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)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    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

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### 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 Detail

    - #### 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 quorumName,
                                            MergePolicyConfig mergePolicyConfig)

    - #### CardinalityEstimatorConfig

          public CardinalityEstimatorConfig(CardinalityEstimatorConfig config)

  - ### Method Detail

    - #### 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

    - #### getQuorumName

          public String getQuorumName()

      Returns the quorum name for operations.
      Returns:
        the quorum name

    - #### setQuorumName

          public CardinalityEstimatorConfig setQuorumName(String quorumName)

      Sets the quorum name for operations.
      Parameters:
        `quorumName` - the quorum 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

    - #### getId

          public int getId()

      Description copied from interface: `IdentifiedDataSerializable`
      Returns type identifier for this class. It should be unique per DataSerializableFactory.
      Specified by:
        `getId` 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()

Copyright © 2019. All rights reserved.