Class CardinalityEstimatorConfig

    • 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​(java.lang.String name)
      • CardinalityEstimatorConfig

        public CardinalityEstimatorConfig​(java.lang.String name,
                                          int backupCount,
                                          int asyncBackupCount)
      • CardinalityEstimatorConfig

        public CardinalityEstimatorConfig​(java.lang.String name,
                                          int backupCount,
                                          int asyncBackupCount,
                                          MergePolicyConfig mergePolicyConfig)
      • CardinalityEstimatorConfig

        public CardinalityEstimatorConfig​(java.lang.String name,
                                          int backupCount,
                                          int asyncBackupCount,
                                          java.lang.String splitBrainProtectionName,
                                          MergePolicyConfig mergePolicyConfig)
    • Method Detail

      • getName

        public java.lang.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​(java.lang.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
      • 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:
        java.lang.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:
        java.lang.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 java.lang.String getSplitBrainProtectionName()
        Returns the split brain protection name for operations.
        Returns:
        the split brain protection name
      • setSplitBrainProtectionName

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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • writeData

        public void writeData​(ObjectDataOutput out)
                       throws java.io.IOException
        Description copied from interface: DataSerializable
        Writes object fields to output stream
        Specified by:
        writeData in interface DataSerializable
        Parameters:
        out - output
        Throws:
        java.io.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 java.io.IOException
        Description copied from interface: DataSerializable
        Reads fields from the input stream
        Specified by:
        readData in interface DataSerializable
        Parameters:
        in - input
        Throws:
        java.io.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​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

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

        public final void validate()