Class Guardrails

  • All Implemented Interfaces:
    GuardrailsMBean

    public final class Guardrails
    extends java.lang.Object
    implements GuardrailsMBean
    Entry point for Guardrails, storing the defined guardrails and providing a few global methods over them.
    • Field Detail

      • instance

        public static final Guardrails instance
      • keyspaces

        public static final MaxThreshold keyspaces
        Guardrail on the total number of user keyspaces.
      • tables

        public static final MaxThreshold tables
        Guardrail on the total number of tables on user keyspaces.
      • columnsPerTable

        public static final MaxThreshold columnsPerTable
        Guardrail on the number of columns per table.
      • secondaryIndexesPerTable

        public static final MaxThreshold secondaryIndexesPerTable
      • createSecondaryIndexesEnabled

        public static final DisableFlag createSecondaryIndexesEnabled
        Guardrail disabling user's ability to create secondary indexes
      • materializedViewsPerTable

        public static final MaxThreshold materializedViewsPerTable
        Guardrail on the number of materialized views per table.
      • tableProperties

        public static final Values<java.lang.String> tableProperties
        Guardrail warning about, ignoring or rejecting the usage of certain table properties.
      • userTimestampsEnabled

        public static final DisableFlag userTimestampsEnabled
        Guardrail disabling user-provided timestamps.
      • groupByEnabled

        public static final DisableFlag groupByEnabled
      • dropTruncateTableEnabled

        public static final DisableFlag dropTruncateTableEnabled
      • uncompressedTablesEnabled

        public static final DisableFlag uncompressedTablesEnabled
        Guardrail disabling user's ability to turn off compression
      • compactTablesEnabled

        public static final DisableFlag compactTablesEnabled
        Guardrail disabling the creation of new COMPACT STORAGE tables
      • pageSize

        public static final MaxThreshold pageSize
        Guardrail on the number of elements returned within page.
      • partitionKeysInSelect

        public static final MaxThreshold partitionKeysInSelect
        Guardrail on the number of partition keys in the IN clause.
      • readBeforeWriteListOperationsEnabled

        public static final DisableFlag readBeforeWriteListOperationsEnabled
        Guardrail disabling operations on lists that require read before write.
      • allowFilteringEnabled

        public static final DisableFlag allowFilteringEnabled
        Guardrail disabling ALLOW FILTERING statement within a query
      • inSelectCartesianProduct

        public static final MaxThreshold inSelectCartesianProduct
        Guardrail on the number of restrictions created by a cartesian product of a CQL's IN query.
      • readConsistencyLevels

        public static final Values<ConsistencyLevel> readConsistencyLevels
        Guardrail on read consistency levels.
      • writeConsistencyLevels

        public static final Values<ConsistencyLevel> writeConsistencyLevels
        Guardrail on write consistency levels.
      • collectionSize

        public static final MaxThreshold collectionSize
        Guardrail on the size of a collection.
      • itemsPerCollection

        public static final MaxThreshold itemsPerCollection
        Guardrail on the number of items of a collection.
      • fieldsPerUDT

        public static final MaxThreshold fieldsPerUDT
        Guardrail on the number of fields on each UDT.
      • minimumReplicationFactor

        public static final MinThreshold minimumReplicationFactor
        Guardrail on the minimum replication factor.
    • Method Detail

      • getKeyspacesWarnThreshold

        public int getKeyspacesWarnThreshold()
        Specified by:
        getKeyspacesWarnThreshold in interface GuardrailsMBean
        Returns:
        The threshold to warn when creating more user keyspaces than threshold. -1 means disabled.
      • getKeyspacesFailThreshold

        public int getKeyspacesFailThreshold()
        Specified by:
        getKeyspacesFailThreshold in interface GuardrailsMBean
        Returns:
        The threshold to prevent creating more user keyspaces than threshold. -1 means disabled.
      • setKeyspacesThreshold

        public void setKeyspacesThreshold​(int warn,
                                          int fail)
        Specified by:
        setKeyspacesThreshold in interface GuardrailsMBean
        Parameters:
        warn - The threshold to warn when creating more user keyspaces than threshold. -1 means disabled.
        fail - The threshold to prevent creating more user keyspaces than threshold. -1 means disabled.
      • getTablesWarnThreshold

        public int getTablesWarnThreshold()
        Specified by:
        getTablesWarnThreshold in interface GuardrailsMBean
        Returns:
        The threshold to warn when creating more tables than threshold. -1 means disabled.
      • getTablesFailThreshold

        public int getTablesFailThreshold()
        Specified by:
        getTablesFailThreshold in interface GuardrailsMBean
        Returns:
        The threshold to prevent creating more tables than threshold. -1 means disabled.
      • setTablesThreshold

        public void setTablesThreshold​(int warn,
                                       int fail)
        Specified by:
        setTablesThreshold in interface GuardrailsMBean
        Parameters:
        warn - The threshold to warn when creating more tables than threshold. -1 means disabled.
        fail - The threshold to prevent creating more tables than threshold. -1 means disabled.
      • getColumnsPerTableWarnThreshold

        public int getColumnsPerTableWarnThreshold()
        Specified by:
        getColumnsPerTableWarnThreshold in interface GuardrailsMBean
        Returns:
        The threshold to warn when having more columns per table than threshold. -1 means disabled.
      • getColumnsPerTableFailThreshold

        public int getColumnsPerTableFailThreshold()
        Specified by:
        getColumnsPerTableFailThreshold in interface GuardrailsMBean
        Returns:
        The threshold to prevent having more columns per table than threshold. -1 means disabled.
      • setColumnsPerTableThreshold

        public void setColumnsPerTableThreshold​(int warn,
                                                int fail)
        Specified by:
        setColumnsPerTableThreshold in interface GuardrailsMBean
        Parameters:
        warn - The threshold to warn when having more columns per table than threshold. -1 means disabled.
        fail - The threshold to prevent having more columns per table than threshold. -1 means disabled.
      • getSecondaryIndexesPerTableWarnThreshold

        public int getSecondaryIndexesPerTableWarnThreshold()
        Specified by:
        getSecondaryIndexesPerTableWarnThreshold in interface GuardrailsMBean
        Returns:
        The threshold to warn when creating more secondary indexes per table than threshold. -1 means disabled.
      • getSecondaryIndexesPerTableFailThreshold

        public int getSecondaryIndexesPerTableFailThreshold()
        Specified by:
        getSecondaryIndexesPerTableFailThreshold in interface GuardrailsMBean
        Returns:
        The threshold to prevent creating more secondary indexes per table than threshold. -1 means disabled.
      • setSecondaryIndexesPerTableThreshold

        public void setSecondaryIndexesPerTableThreshold​(int warn,
                                                         int fail)
        Specified by:
        setSecondaryIndexesPerTableThreshold in interface GuardrailsMBean
        Parameters:
        warn - The threshold to warn when creating more secondary indexes per table than threshold. -1 means disabled.
        fail - The threshold to prevent creating more secondary indexes per table than threshold. -1 means disabled.
      • getSecondaryIndexesEnabled

        public boolean getSecondaryIndexesEnabled()
        Specified by:
        getSecondaryIndexesEnabled in interface GuardrailsMBean
        Returns:
        Whether secondary index creation is active or not on the node
      • getMaterializedViewsPerTableWarnThreshold

        public int getMaterializedViewsPerTableWarnThreshold()
        Specified by:
        getMaterializedViewsPerTableWarnThreshold in interface GuardrailsMBean
        Returns:
        The threshold to warn when creating more materialized views per table than threshold. -1 means disabled.
      • getMaterializedViewsPerTableFailThreshold

        public int getMaterializedViewsPerTableFailThreshold()
        Specified by:
        getMaterializedViewsPerTableFailThreshold in interface GuardrailsMBean
        Returns:
        The threshold to prevent creating more materialized views per table than threshold. -1 means disabled.
      • setMaterializedViewsPerTableThreshold

        public void setMaterializedViewsPerTableThreshold​(int warn,
                                                          int fail)
        Specified by:
        setMaterializedViewsPerTableThreshold in interface GuardrailsMBean
        Parameters:
        warn - The threshold to warn when creating more materialized views per table than threshold. -1 means disabled.
        fail - The threshold to prevent creating more materialized views per table than threshold. -1 means disabled.
      • getTablePropertiesWarned

        public java.util.Set<java.lang.String> getTablePropertiesWarned()
        Specified by:
        getTablePropertiesWarned in interface GuardrailsMBean
        Returns:
        properties that are warned about when creating or altering a table.
      • getTablePropertiesWarnedCSV

        public java.lang.String getTablePropertiesWarnedCSV()
        Specified by:
        getTablePropertiesWarnedCSV in interface GuardrailsMBean
        Returns:
        Comma-separated list of properties that are warned about when creating or altering a table.
      • setTablePropertiesWarned

        public void setTablePropertiesWarned​(java.lang.String... properties)
      • setTablePropertiesWarned

        public void setTablePropertiesWarned​(java.util.Set<java.lang.String> properties)
        Specified by:
        setTablePropertiesWarned in interface GuardrailsMBean
        Parameters:
        properties - properties that are warned about when creating or altering a table.
      • setTablePropertiesWarnedCSV

        public void setTablePropertiesWarnedCSV​(java.lang.String properties)
        Specified by:
        setTablePropertiesWarnedCSV in interface GuardrailsMBean
        Parameters:
        properties - Comma-separated list of properties that are warned about when creating or altering a table.
      • getTablePropertiesDisallowed

        public java.util.Set<java.lang.String> getTablePropertiesDisallowed()
        Specified by:
        getTablePropertiesDisallowed in interface GuardrailsMBean
        Returns:
        properties that are not allowed when creating or altering a table.
      • getTablePropertiesDisallowedCSV

        public java.lang.String getTablePropertiesDisallowedCSV()
        Specified by:
        getTablePropertiesDisallowedCSV in interface GuardrailsMBean
        Returns:
        Comma-separated list of properties that are not allowed when creating or altering a table.
      • setTablePropertiesDisallowed

        public void setTablePropertiesDisallowed​(java.lang.String... properties)
      • setTablePropertiesDisallowed

        public void setTablePropertiesDisallowed​(java.util.Set<java.lang.String> properties)
        Specified by:
        setTablePropertiesDisallowed in interface GuardrailsMBean
        Parameters:
        properties - properties that are not allowed when creating or altering a table.
      • setTablePropertiesDisallowedCSV

        public void setTablePropertiesDisallowedCSV​(java.lang.String properties)
        Specified by:
        setTablePropertiesDisallowedCSV in interface GuardrailsMBean
        Parameters:
        properties - Comma-separated list of properties that are not allowed when creating or altering a table.
      • getTablePropertiesIgnored

        public java.util.Set<java.lang.String> getTablePropertiesIgnored()
        Specified by:
        getTablePropertiesIgnored in interface GuardrailsMBean
        Returns:
        properties that are ignored when creating or altering a table.
      • getTablePropertiesIgnoredCSV

        public java.lang.String getTablePropertiesIgnoredCSV()
        Specified by:
        getTablePropertiesIgnoredCSV in interface GuardrailsMBean
        Returns:
        Comma-separated list of properties that are ignored when creating or altering a table.
      • setTablePropertiesIgnored

        public void setTablePropertiesIgnored​(java.lang.String... properties)
      • setTablePropertiesIgnored

        public void setTablePropertiesIgnored​(java.util.Set<java.lang.String> properties)
        Specified by:
        setTablePropertiesIgnored in interface GuardrailsMBean
        Parameters:
        properties - properties that are ignored when creating or altering a table.
      • setTablePropertiesIgnoredCSV

        public void setTablePropertiesIgnoredCSV​(java.lang.String properties)
        Specified by:
        setTablePropertiesIgnoredCSV in interface GuardrailsMBean
        Parameters:
        properties - Comma-separated list of properties that are ignored when creating or altering a table.
      • getUserTimestampsEnabled

        public boolean getUserTimestampsEnabled()
        Description copied from interface: GuardrailsMBean
        Returns whether user-provided timestamps are allowed.
        Specified by:
        getUserTimestampsEnabled in interface GuardrailsMBean
        Returns:
        true if user-provided timestamps are allowed, false otherwise.
      • setUserTimestampsEnabled

        public void setUserTimestampsEnabled​(boolean enabled)
        Description copied from interface: GuardrailsMBean
        Sets whether user-provided timestamps are allowed.
        Specified by:
        setUserTimestampsEnabled in interface GuardrailsMBean
        Parameters:
        enabled - true if user-provided timestamps are allowed, false otherwise.
      • getAllowFilteringEnabled

        public boolean getAllowFilteringEnabled()
        Description copied from interface: GuardrailsMBean
        Returns whether ALLOW FILTERING property is allowed.
        Specified by:
        getAllowFilteringEnabled in interface GuardrailsMBean
        Returns:
        true if ALLOW FILTERING is allowed, false otherwise.
      • setAllowFilteringEnabled

        public void setAllowFilteringEnabled​(boolean enabled)
        Description copied from interface: GuardrailsMBean
        Sets whether ALLOW FILTERING is allowed.
        Specified by:
        setAllowFilteringEnabled in interface GuardrailsMBean
        Parameters:
        enabled - true if ALLOW FILTERING is allowed, false otherwise.
      • getUncompressedTablesEnabled

        public boolean getUncompressedTablesEnabled()
        Description copied from interface: GuardrailsMBean
        Returns whether users can disable compression on tables
        Specified by:
        getUncompressedTablesEnabled in interface GuardrailsMBean
        Returns:
        true if users can disable compression on a table, false otherwise.
      • setUncompressedTablesEnabled

        public void setUncompressedTablesEnabled​(boolean enabled)
        Description copied from interface: GuardrailsMBean
        Sets whether users can disable compression on tables
        Specified by:
        setUncompressedTablesEnabled in interface GuardrailsMBean
        Parameters:
        enabled - true if users can disable compression on a table, false otherwise.
      • getCompactTablesEnabled

        public boolean getCompactTablesEnabled()
        Description copied from interface: GuardrailsMBean
        Returns whether users can create new COMPACT STORAGE tables
        Specified by:
        getCompactTablesEnabled in interface GuardrailsMBean
        Returns:
        true if allowed, false otherwise.
      • setCompactTablesEnabled

        public void setCompactTablesEnabled​(boolean enabled)
        Description copied from interface: GuardrailsMBean
        Sets whether users can create new COMPACT STORAGE tables
        Specified by:
        setCompactTablesEnabled in interface GuardrailsMBean
        Parameters:
        enabled - true if allowed, false otherwise.
      • getGroupByEnabled

        public boolean getGroupByEnabled()
        Description copied from interface: GuardrailsMBean
        Returns whether GROUP BY queries are allowed.
        Specified by:
        getGroupByEnabled in interface GuardrailsMBean
        Returns:
        true if allowed, false otherwise.
      • setGroupByEnabled

        public void setGroupByEnabled​(boolean enabled)
        Description copied from interface: GuardrailsMBean
        Sets whether GROUP BY queries are allowed.
        Specified by:
        setGroupByEnabled in interface GuardrailsMBean
        Parameters:
        enabled - true if allowed, false otherwise.
      • getDropTruncateTableEnabled

        public boolean getDropTruncateTableEnabled()
        Description copied from interface: GuardrailsMBean
        Returns whether users can TRUNCATE or DROP TABLE
        Specified by:
        getDropTruncateTableEnabled in interface GuardrailsMBean
        Returns:
        true if allowed, false otherwise.
      • getPageSizeWarnThreshold

        public int getPageSizeWarnThreshold()
        Specified by:
        getPageSizeWarnThreshold in interface GuardrailsMBean
        Returns:
        The threshold to warn when requested page size greater than threshold. -1 means disabled.
      • getPageSizeFailThreshold

        public int getPageSizeFailThreshold()
        Specified by:
        getPageSizeFailThreshold in interface GuardrailsMBean
        Returns:
        The threshold to prevent requesting page with more elements than threshold. -1 means disabled.
      • setPageSizeThreshold

        public void setPageSizeThreshold​(int warn,
                                         int fail)
        Specified by:
        setPageSizeThreshold in interface GuardrailsMBean
        Parameters:
        warn - The threshold to warn when the requested page size is greater than threshold. -1 means disabled.
        fail - The threshold to prevent requesting pages with more elements than threshold. -1 means disabled.
      • getReadBeforeWriteListOperationsEnabled

        public boolean getReadBeforeWriteListOperationsEnabled()
        Description copied from interface: GuardrailsMBean
        Returns whether list operations that require read before write are allowed.
        Specified by:
        getReadBeforeWriteListOperationsEnabled in interface GuardrailsMBean
        Returns:
        true if list operations that require read before write are allowed, false otherwise.
      • setReadBeforeWriteListOperationsEnabled

        public void setReadBeforeWriteListOperationsEnabled​(boolean enabled)
        Description copied from interface: GuardrailsMBean
        Sets whether list operations that require read before write are allowed.
        Specified by:
        setReadBeforeWriteListOperationsEnabled in interface GuardrailsMBean
        Parameters:
        enabled - true if list operations that require read before write are allowed, false otherwise.
      • getPartitionKeysInSelectWarnThreshold

        public int getPartitionKeysInSelectWarnThreshold()
        Specified by:
        getPartitionKeysInSelectWarnThreshold in interface GuardrailsMBean
        Returns:
        The threshold to warn when the number of partition keys in a select statement greater than threshold. -1 means disabled.
      • getPartitionKeysInSelectFailThreshold

        public int getPartitionKeysInSelectFailThreshold()
        Specified by:
        getPartitionKeysInSelectFailThreshold in interface GuardrailsMBean
        Returns:
        The threshold to fail when the number of partition keys in a select statement greater than threshold. -1 means disabled.
      • setPartitionKeysInSelectThreshold

        public void setPartitionKeysInSelectThreshold​(int warn,
                                                      int fail)
        Specified by:
        setPartitionKeysInSelectThreshold in interface GuardrailsMBean
        Parameters:
        warn - The threshold to warn when the number of partition keys in a select statement is greater than threshold -1 means disabled.
        fail - The threshold to prevent when the number of partition keys in a select statement is more than threshold -1 means disabled.
      • getCollectionSizeWarnThreshold

        @Nullable
        public java.lang.String getCollectionSizeWarnThreshold()
        Specified by:
        getCollectionSizeWarnThreshold in interface GuardrailsMBean
        Returns:
        The threshold to warn when encountering larger size of collection data than threshold, as a string formatted as in, for example, 10GiB, 20MiB, 30KiB or 40B. A null value means that the threshold is disabled.
      • getCollectionSizeFailThreshold

        @Nullable
        public java.lang.String getCollectionSizeFailThreshold()
        Specified by:
        getCollectionSizeFailThreshold in interface GuardrailsMBean
        Returns:
        The threshold to prevent collections with larger data size than threshold, as a string formatted as in, for example, 10GiB, 20MiB, 30KiB or 40B. A null value means that the threshold is disabled.
      • setCollectionSizeThreshold

        public void setCollectionSizeThreshold​(@Nullable
                                               java.lang.String warnSize,
                                               @Nullable
                                               java.lang.String failSize)
        Specified by:
        setCollectionSizeThreshold in interface GuardrailsMBean
        Parameters:
        warnSize - The threshold to warn when encountering larger size of collection data than threshold, as a string formatted as in, for example, 10GiB, 20MiB, 30KiB or 40B. A null value means disabled.
        failSize - The threshold to prevent collections with larger data size than threshold, as a string formatted as in, for example, 10GiB, 20MiB, 30KiB or 40B. A null value means disabled.
      • getItemsPerCollectionWarnThreshold

        public int getItemsPerCollectionWarnThreshold()
        Specified by:
        getItemsPerCollectionWarnThreshold in interface GuardrailsMBean
        Returns:
        The threshold to warn when encountering more elements in a collection than threshold.
      • getItemsPerCollectionFailThreshold

        public int getItemsPerCollectionFailThreshold()
        Specified by:
        getItemsPerCollectionFailThreshold in interface GuardrailsMBean
        Returns:
        The threshold to prevent collections with more elements than threshold.
      • setItemsPerCollectionThreshold

        public void setItemsPerCollectionThreshold​(int warn,
                                                   int fail)
        Specified by:
        setItemsPerCollectionThreshold in interface GuardrailsMBean
        Parameters:
        warn - The threshold to warn when encountering more elements in a collection than threshold.
        fail - The threshold to prevent collectiosn with more elements than threshold.
      • getInSelectCartesianProductWarnThreshold

        public int getInSelectCartesianProductWarnThreshold()
        Specified by:
        getInSelectCartesianProductWarnThreshold in interface GuardrailsMBean
        Returns:
        The threshold to warn when an IN query creates a cartesian product with a size exceeding threshold. -1 means disabled.
      • getInSelectCartesianProductFailThreshold

        public int getInSelectCartesianProductFailThreshold()
        Specified by:
        getInSelectCartesianProductFailThreshold in interface GuardrailsMBean
        Returns:
        The threshold to prevent IN queries creating a cartesian product with a size exceeding threshold. -1 means disabled.
      • setInSelectCartesianProductThreshold

        public void setInSelectCartesianProductThreshold​(int warn,
                                                         int fail)
        Specified by:
        setInSelectCartesianProductThreshold in interface GuardrailsMBean
        Parameters:
        warn - The threshold to warn when an IN query creates a cartesian product with a size exceeding threshold. -1 means disabled.
        fail - The threshold to prevent IN queries creating a cartesian product with a size exceeding threshold. -1 means disabled.
      • getReadConsistencyLevelsWarned

        public java.util.Set<java.lang.String> getReadConsistencyLevelsWarned()
        Specified by:
        getReadConsistencyLevelsWarned in interface GuardrailsMBean
        Returns:
        consistency levels that are warned about when reading.
      • getReadConsistencyLevelsWarnedCSV

        public java.lang.String getReadConsistencyLevelsWarnedCSV()
        Specified by:
        getReadConsistencyLevelsWarnedCSV in interface GuardrailsMBean
        Returns:
        Comma-separated list of consistency levels that are warned about when reading.
      • setReadConsistencyLevelsWarned

        public void setReadConsistencyLevelsWarned​(java.util.Set<java.lang.String> consistencyLevels)
        Specified by:
        setReadConsistencyLevelsWarned in interface GuardrailsMBean
        Parameters:
        consistencyLevels - consistency levels that are warned about when reading.
      • setReadConsistencyLevelsWarnedCSV

        public void setReadConsistencyLevelsWarnedCSV​(java.lang.String consistencyLevels)
        Specified by:
        setReadConsistencyLevelsWarnedCSV in interface GuardrailsMBean
        Parameters:
        consistencyLevels - Comma-separated list of consistency levels that are warned about when reading.
      • getReadConsistencyLevelsDisallowed

        public java.util.Set<java.lang.String> getReadConsistencyLevelsDisallowed()
        Specified by:
        getReadConsistencyLevelsDisallowed in interface GuardrailsMBean
        Returns:
        consistency levels that are not allowed when reading.
      • getReadConsistencyLevelsDisallowedCSV

        public java.lang.String getReadConsistencyLevelsDisallowedCSV()
        Specified by:
        getReadConsistencyLevelsDisallowedCSV in interface GuardrailsMBean
        Returns:
        Comma-separated list of consistency levels that are not allowed when reading.
      • setReadConsistencyLevelsDisallowed

        public void setReadConsistencyLevelsDisallowed​(java.util.Set<java.lang.String> consistencyLevels)
        Specified by:
        setReadConsistencyLevelsDisallowed in interface GuardrailsMBean
        Parameters:
        consistencyLevels - consistency levels that are not allowed when reading.
      • setReadConsistencyLevelsDisallowedCSV

        public void setReadConsistencyLevelsDisallowedCSV​(java.lang.String consistencyLevels)
        Specified by:
        setReadConsistencyLevelsDisallowedCSV in interface GuardrailsMBean
        Parameters:
        consistencyLevels - Comma-separated list of consistency levels that are not allowed when reading.
      • getWriteConsistencyLevelsWarned

        public java.util.Set<java.lang.String> getWriteConsistencyLevelsWarned()
        Specified by:
        getWriteConsistencyLevelsWarned in interface GuardrailsMBean
        Returns:
        consistency levels that are warned about when writing.
      • getWriteConsistencyLevelsWarnedCSV

        public java.lang.String getWriteConsistencyLevelsWarnedCSV()
        Specified by:
        getWriteConsistencyLevelsWarnedCSV in interface GuardrailsMBean
        Returns:
        Comma-separated list of consistency levels that are warned about when writing.
      • setWriteConsistencyLevelsWarned

        public void setWriteConsistencyLevelsWarned​(java.util.Set<java.lang.String> consistencyLevels)
        Specified by:
        setWriteConsistencyLevelsWarned in interface GuardrailsMBean
        Parameters:
        consistencyLevels - consistency levels that are warned about when writing.
      • setWriteConsistencyLevelsWarnedCSV

        public void setWriteConsistencyLevelsWarnedCSV​(java.lang.String consistencyLevels)
        Specified by:
        setWriteConsistencyLevelsWarnedCSV in interface GuardrailsMBean
        Parameters:
        consistencyLevels - Comma-separated list of consistency levels that are warned about when writing.
      • getWriteConsistencyLevelsDisallowed

        public java.util.Set<java.lang.String> getWriteConsistencyLevelsDisallowed()
        Specified by:
        getWriteConsistencyLevelsDisallowed in interface GuardrailsMBean
        Returns:
        consistency levels that are not allowed when writing.
      • getWriteConsistencyLevelsDisallowedCSV

        public java.lang.String getWriteConsistencyLevelsDisallowedCSV()
        Specified by:
        getWriteConsistencyLevelsDisallowedCSV in interface GuardrailsMBean
        Returns:
        Comma-separated list of consistency levels that are not allowed when writing.
      • setWriteConsistencyLevelsDisallowed

        public void setWriteConsistencyLevelsDisallowed​(java.util.Set<java.lang.String> consistencyLevels)
        Specified by:
        setWriteConsistencyLevelsDisallowed in interface GuardrailsMBean
        Parameters:
        consistencyLevels - consistency levels that are not allowed when writing.
      • setWriteConsistencyLevelsDisallowedCSV

        public void setWriteConsistencyLevelsDisallowedCSV​(java.lang.String consistencyLevels)
        Specified by:
        setWriteConsistencyLevelsDisallowedCSV in interface GuardrailsMBean
        Parameters:
        consistencyLevels - Comma-separated list of consistency levels that are not allowed when writing.
      • getFieldsPerUDTWarnThreshold

        public int getFieldsPerUDTWarnThreshold()
        Specified by:
        getFieldsPerUDTWarnThreshold in interface GuardrailsMBean
        Returns:
        The threshold to warn when creating a UDT with more fields than threshold. -1 means disabled.
      • getFieldsPerUDTFailThreshold

        public int getFieldsPerUDTFailThreshold()
        Specified by:
        getFieldsPerUDTFailThreshold in interface GuardrailsMBean
        Returns:
        The threshold to fail when creating a UDT with more fields than threshold. -1 means disabled.
      • setFieldsPerUDTThreshold

        public void setFieldsPerUDTThreshold​(int warn,
                                             int fail)
        Specified by:
        setFieldsPerUDTThreshold in interface GuardrailsMBean
        Parameters:
        warn - The threshold to warn when creating a UDT with more fields than threshold. -1 means disabled.
        fail - The threshold to prevent creating a UDT with more fields than threshold. -1 means disabled.
      • getDataDiskUsagePercentageWarnThreshold

        public int getDataDiskUsagePercentageWarnThreshold()
        Specified by:
        getDataDiskUsagePercentageWarnThreshold in interface GuardrailsMBean
        Returns:
        The threshold to warn when local data disk usage percentage exceeds that threshold. Allowed values are in the range [1, 100], and -1 means disabled.
      • getDataDiskUsagePercentageFailThreshold

        public int getDataDiskUsagePercentageFailThreshold()
        Specified by:
        getDataDiskUsagePercentageFailThreshold in interface GuardrailsMBean
        Returns:
        The threshold to fail when local data disk usage percentage exceeds that threshold. Allowed values are in the range [1, 100], and -1 means disabled.
      • setDataDiskUsagePercentageThreshold

        public void setDataDiskUsagePercentageThreshold​(int warn,
                                                        int fail)
        Specified by:
        setDataDiskUsagePercentageThreshold in interface GuardrailsMBean
        Parameters:
        warn - The threshold to warn when local disk usage percentage exceeds that threshold. Allowed values are in the range [1, 100], and -1 means disabled.
        fail - The threshold to fail when local disk usage percentage exceeds that threshold. Allowed values are in the range [1, 100], and -1 means disabled.
      • getDataDiskUsageMaxDiskSize

        @Nullable
        public java.lang.String getDataDiskUsageMaxDiskSize()
        Specified by:
        getDataDiskUsageMaxDiskSize in interface GuardrailsMBean
        Returns:
        The max disk size of the data directories when calculating disk usage thresholds, as a string formatted as in, for example, 10GiB, 20MiB, 30KiB or 40B. A null value means disabled.
      • setDataDiskUsageMaxDiskSize

        public void setDataDiskUsageMaxDiskSize​(@Nullable
                                                java.lang.String size)
        Specified by:
        setDataDiskUsageMaxDiskSize in interface GuardrailsMBean
        Parameters:
        size - The max disk size of the data directories when calculating disk usage thresholds, as a string formatted as in, for example, 10GiB, 20MiB, 30KiB or 40B. A null value means disabled.
      • setMinimumReplicationFactorThreshold

        public void setMinimumReplicationFactorThreshold​(int warn,
                                                         int fail)
        Specified by:
        setMinimumReplicationFactorThreshold in interface GuardrailsMBean
        Parameters:
        warn - the threshold to warn when the minimum replication factor is lesser than threshold -1 means disabled.
        fail - the threshold to fail when the minimum replication factor is lesser than threshold -1 means disabled.