Class Guardrails
- java.lang.Object
-
- org.apache.cassandra.db.guardrails.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 Summary
Fields Modifier and Type Field Description static DisableFlagallowFilteringEnabledGuardrail disabling ALLOW FILTERING statement within a querystatic MaxThresholdcollectionSizeGuardrail on the size of a collection.static MaxThresholdcolumnsPerTableGuardrail on the number of columns per table.static DisableFlagcompactTablesEnabledGuardrail disabling the creation of new COMPACT STORAGE tablesstatic GuardrailsConfigProviderCONFIG_PROVIDERstatic DisableFlagcreateSecondaryIndexesEnabledGuardrail disabling user's ability to create secondary indexesstatic DisableFlagdropTruncateTableEnabledstatic MaxThresholdfieldsPerUDTGuardrail on the number of fields on each UDT.static DisableFlaggroupByEnabledstatic MaxThresholdinSelectCartesianProductGuardrail on the number of restrictions created by a cartesian product of a CQL'sINquery.static Guardrailsinstancestatic MaxThresholditemsPerCollectionGuardrail on the number of items of a collection.static MaxThresholdkeyspacesGuardrail on the total number of user keyspaces.static PercentageThresholdlocalDataDiskUsageGuardrail on the data disk usage on the local node, used by a periodic task to calculate and propagate that status.static MaxThresholdmaterializedViewsPerTableGuardrail on the number of materialized views per table.static java.lang.StringMBEAN_NAMEstatic MinThresholdminimumReplicationFactorGuardrail on the minimum replication factor.static MaxThresholdpageSizeGuardrail on the number of elements returned within page.static MaxThresholdpartitionKeysInSelectGuardrail on the number of partition keys in the IN clause.static DisableFlagreadBeforeWriteListOperationsEnabledGuardrail disabling operations on lists that require read before write.static Values<ConsistencyLevel>readConsistencyLevelsGuardrail on read consistency levels.static Predicates<InetAddressAndPort>replicaDiskUsageGuardrail on the data disk usage on replicas, used at write time to verify the status of the involved replicas.static MaxThresholdsecondaryIndexesPerTablestatic Values<java.lang.String>tablePropertiesGuardrail warning about, ignoring or rejecting the usage of certain table properties.static MaxThresholdtablesGuardrail on the total number of tables on user keyspaces.static DisableFlaguncompressedTablesEnabledGuardrail disabling user's ability to turn off compressionstatic DisableFlaguserTimestampsEnabledGuardrail disabling user-provided timestamps.static Values<ConsistencyLevel>writeConsistencyLevelsGuardrail on write consistency levels.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleangetAllowFilteringEnabled()Returns whether ALLOW FILTERING property is allowed.java.lang.StringgetCollectionSizeFailThreshold()java.lang.StringgetCollectionSizeWarnThreshold()intgetColumnsPerTableFailThreshold()intgetColumnsPerTableWarnThreshold()booleangetCompactTablesEnabled()Returns whether users can create new COMPACT STORAGE tablesjava.lang.StringgetDataDiskUsageMaxDiskSize()intgetDataDiskUsagePercentageFailThreshold()intgetDataDiskUsagePercentageWarnThreshold()booleangetDropTruncateTableEnabled()Returns whether users can TRUNCATE or DROP TABLEintgetFieldsPerUDTFailThreshold()intgetFieldsPerUDTWarnThreshold()booleangetGroupByEnabled()Returns whether GROUP BY queries are allowed.intgetInSelectCartesianProductFailThreshold()intgetInSelectCartesianProductWarnThreshold()intgetItemsPerCollectionFailThreshold()intgetItemsPerCollectionWarnThreshold()intgetKeyspacesFailThreshold()intgetKeyspacesWarnThreshold()intgetMaterializedViewsPerTableFailThreshold()intgetMaterializedViewsPerTableWarnThreshold()intgetMinimumReplicationFactorFailThreshold()intgetMinimumReplicationFactorWarnThreshold()intgetPageSizeFailThreshold()intgetPageSizeWarnThreshold()intgetPartitionKeysInSelectFailThreshold()intgetPartitionKeysInSelectWarnThreshold()booleangetReadBeforeWriteListOperationsEnabled()Returns whether list operations that require read before write are allowed.java.util.Set<java.lang.String>getReadConsistencyLevelsDisallowed()java.lang.StringgetReadConsistencyLevelsDisallowedCSV()java.util.Set<java.lang.String>getReadConsistencyLevelsWarned()java.lang.StringgetReadConsistencyLevelsWarnedCSV()booleangetSecondaryIndexesEnabled()intgetSecondaryIndexesPerTableFailThreshold()intgetSecondaryIndexesPerTableWarnThreshold()java.util.Set<java.lang.String>getTablePropertiesDisallowed()java.lang.StringgetTablePropertiesDisallowedCSV()java.util.Set<java.lang.String>getTablePropertiesIgnored()java.lang.StringgetTablePropertiesIgnoredCSV()java.util.Set<java.lang.String>getTablePropertiesWarned()java.lang.StringgetTablePropertiesWarnedCSV()intgetTablesFailThreshold()intgetTablesWarnThreshold()booleangetUncompressedTablesEnabled()Returns whether users can disable compression on tablesbooleangetUserTimestampsEnabled()Returns whether user-provided timestamps are allowed.java.util.Set<java.lang.String>getWriteConsistencyLevelsDisallowed()java.lang.StringgetWriteConsistencyLevelsDisallowedCSV()java.util.Set<java.lang.String>getWriteConsistencyLevelsWarned()java.lang.StringgetWriteConsistencyLevelsWarnedCSV()voidsetAllowFilteringEnabled(boolean enabled)Sets whether ALLOW FILTERING is allowed.voidsetCollectionSizeThreshold(java.lang.String warnSize, java.lang.String failSize)voidsetColumnsPerTableThreshold(int warn, int fail)voidsetCompactTablesEnabled(boolean enabled)Sets whether users can create new COMPACT STORAGE tablesvoidsetDataDiskUsageMaxDiskSize(java.lang.String size)voidsetDataDiskUsagePercentageThreshold(int warn, int fail)voidsetDropTruncateTableEnabled(boolean enabled)Sets whether users can TRUNCATE or DROP TABLEvoidsetFieldsPerUDTThreshold(int warn, int fail)voidsetGroupByEnabled(boolean enabled)Sets whether GROUP BY queries are allowed.voidsetInSelectCartesianProductThreshold(int warn, int fail)voidsetItemsPerCollectionThreshold(int warn, int fail)voidsetKeyspacesThreshold(int warn, int fail)voidsetMaterializedViewsPerTableThreshold(int warn, int fail)voidsetMinimumReplicationFactorThreshold(int warn, int fail)voidsetPageSizeThreshold(int warn, int fail)voidsetPartitionKeysInSelectThreshold(int warn, int fail)voidsetReadBeforeWriteListOperationsEnabled(boolean enabled)Sets whether list operations that require read before write are allowed.voidsetReadConsistencyLevelsDisallowed(java.util.Set<java.lang.String> consistencyLevels)voidsetReadConsistencyLevelsDisallowedCSV(java.lang.String consistencyLevels)voidsetReadConsistencyLevelsWarned(java.util.Set<java.lang.String> consistencyLevels)voidsetReadConsistencyLevelsWarnedCSV(java.lang.String consistencyLevels)voidsetSecondaryIndexesEnabled(boolean enabled)Enables or disables the ability to create secondary indexesvoidsetSecondaryIndexesPerTableThreshold(int warn, int fail)voidsetTablePropertiesDisallowed(java.lang.String... properties)voidsetTablePropertiesDisallowed(java.util.Set<java.lang.String> properties)voidsetTablePropertiesDisallowedCSV(java.lang.String properties)voidsetTablePropertiesIgnored(java.lang.String... properties)voidsetTablePropertiesIgnored(java.util.Set<java.lang.String> properties)voidsetTablePropertiesIgnoredCSV(java.lang.String properties)voidsetTablePropertiesWarned(java.lang.String... properties)voidsetTablePropertiesWarned(java.util.Set<java.lang.String> properties)voidsetTablePropertiesWarnedCSV(java.lang.String properties)voidsetTablesThreshold(int warn, int fail)voidsetUncompressedTablesEnabled(boolean enabled)Sets whether users can disable compression on tablesvoidsetUserTimestampsEnabled(boolean enabled)Sets whether user-provided timestamps are allowed.voidsetWriteConsistencyLevelsDisallowed(java.util.Set<java.lang.String> consistencyLevels)voidsetWriteConsistencyLevelsDisallowedCSV(java.lang.String consistencyLevels)voidsetWriteConsistencyLevelsWarned(java.util.Set<java.lang.String> consistencyLevels)voidsetWriteConsistencyLevelsWarnedCSV(java.lang.String consistencyLevels)
-
-
-
Field Detail
-
MBEAN_NAME
public static final java.lang.String MBEAN_NAME
- See Also:
- Constant Field Values
-
CONFIG_PROVIDER
public static final GuardrailsConfigProvider CONFIG_PROVIDER
-
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'sINquery.
-
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.
-
localDataDiskUsage
public static final PercentageThreshold localDataDiskUsage
Guardrail on the data disk usage on the local node, used by a periodic task to calculate and propagate that status. SeeDiskUsageMonitorandDiskUsageBroadcaster.
-
replicaDiskUsage
public static final Predicates<InetAddressAndPort> replicaDiskUsage
Guardrail on the data disk usage on replicas, used at write time to verify the status of the involved replicas. SeeDiskUsageMonitorandDiskUsageBroadcaster.
-
minimumReplicationFactor
public static final MinThreshold minimumReplicationFactor
Guardrail on the minimum replication factor.
-
-
Method Detail
-
getKeyspacesWarnThreshold
public int getKeyspacesWarnThreshold()
- Specified by:
getKeyspacesWarnThresholdin interfaceGuardrailsMBean- Returns:
- The threshold to warn when creating more user keyspaces than threshold. -1 means disabled.
-
getKeyspacesFailThreshold
public int getKeyspacesFailThreshold()
- Specified by:
getKeyspacesFailThresholdin interfaceGuardrailsMBean- Returns:
- The threshold to prevent creating more user keyspaces than threshold. -1 means disabled.
-
setKeyspacesThreshold
public void setKeyspacesThreshold(int warn, int fail)- Specified by:
setKeyspacesThresholdin interfaceGuardrailsMBean- 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:
getTablesWarnThresholdin interfaceGuardrailsMBean- Returns:
- The threshold to warn when creating more tables than threshold. -1 means disabled.
-
getTablesFailThreshold
public int getTablesFailThreshold()
- Specified by:
getTablesFailThresholdin interfaceGuardrailsMBean- Returns:
- The threshold to prevent creating more tables than threshold. -1 means disabled.
-
setTablesThreshold
public void setTablesThreshold(int warn, int fail)- Specified by:
setTablesThresholdin interfaceGuardrailsMBean- 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:
getColumnsPerTableWarnThresholdin interfaceGuardrailsMBean- Returns:
- The threshold to warn when having more columns per table than threshold. -1 means disabled.
-
getColumnsPerTableFailThreshold
public int getColumnsPerTableFailThreshold()
- Specified by:
getColumnsPerTableFailThresholdin interfaceGuardrailsMBean- 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:
setColumnsPerTableThresholdin interfaceGuardrailsMBean- 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:
getSecondaryIndexesPerTableWarnThresholdin interfaceGuardrailsMBean- Returns:
- The threshold to warn when creating more secondary indexes per table than threshold. -1 means disabled.
-
getSecondaryIndexesPerTableFailThreshold
public int getSecondaryIndexesPerTableFailThreshold()
- Specified by:
getSecondaryIndexesPerTableFailThresholdin interfaceGuardrailsMBean- 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:
setSecondaryIndexesPerTableThresholdin interfaceGuardrailsMBean- 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:
getSecondaryIndexesEnabledin interfaceGuardrailsMBean- Returns:
- Whether secondary index creation is active or not on the node
-
setSecondaryIndexesEnabled
public void setSecondaryIndexesEnabled(boolean enabled)
Description copied from interface:GuardrailsMBeanEnables or disables the ability to create secondary indexes- Specified by:
setSecondaryIndexesEnabledin interfaceGuardrailsMBean
-
getMaterializedViewsPerTableWarnThreshold
public int getMaterializedViewsPerTableWarnThreshold()
- Specified by:
getMaterializedViewsPerTableWarnThresholdin interfaceGuardrailsMBean- Returns:
- The threshold to warn when creating more materialized views per table than threshold. -1 means disabled.
-
getMaterializedViewsPerTableFailThreshold
public int getMaterializedViewsPerTableFailThreshold()
- Specified by:
getMaterializedViewsPerTableFailThresholdin interfaceGuardrailsMBean- 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:
setMaterializedViewsPerTableThresholdin interfaceGuardrailsMBean- 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:
getTablePropertiesWarnedin interfaceGuardrailsMBean- Returns:
- properties that are warned about when creating or altering a table.
-
getTablePropertiesWarnedCSV
public java.lang.String getTablePropertiesWarnedCSV()
- Specified by:
getTablePropertiesWarnedCSVin interfaceGuardrailsMBean- 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:
setTablePropertiesWarnedin interfaceGuardrailsMBean- Parameters:
properties- properties that are warned about when creating or altering a table.
-
setTablePropertiesWarnedCSV
public void setTablePropertiesWarnedCSV(java.lang.String properties)
- Specified by:
setTablePropertiesWarnedCSVin interfaceGuardrailsMBean- 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:
getTablePropertiesDisallowedin interfaceGuardrailsMBean- Returns:
- properties that are not allowed when creating or altering a table.
-
getTablePropertiesDisallowedCSV
public java.lang.String getTablePropertiesDisallowedCSV()
- Specified by:
getTablePropertiesDisallowedCSVin interfaceGuardrailsMBean- 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:
setTablePropertiesDisallowedin interfaceGuardrailsMBean- Parameters:
properties- properties that are not allowed when creating or altering a table.
-
setTablePropertiesDisallowedCSV
public void setTablePropertiesDisallowedCSV(java.lang.String properties)
- Specified by:
setTablePropertiesDisallowedCSVin interfaceGuardrailsMBean- 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:
getTablePropertiesIgnoredin interfaceGuardrailsMBean- Returns:
- properties that are ignored when creating or altering a table.
-
getTablePropertiesIgnoredCSV
public java.lang.String getTablePropertiesIgnoredCSV()
- Specified by:
getTablePropertiesIgnoredCSVin interfaceGuardrailsMBean- 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:
setTablePropertiesIgnoredin interfaceGuardrailsMBean- Parameters:
properties- properties that are ignored when creating or altering a table.
-
setTablePropertiesIgnoredCSV
public void setTablePropertiesIgnoredCSV(java.lang.String properties)
- Specified by:
setTablePropertiesIgnoredCSVin interfaceGuardrailsMBean- Parameters:
properties- Comma-separated list of properties that are ignored when creating or altering a table.
-
getUserTimestampsEnabled
public boolean getUserTimestampsEnabled()
Description copied from interface:GuardrailsMBeanReturns whether user-provided timestamps are allowed.- Specified by:
getUserTimestampsEnabledin interfaceGuardrailsMBean- Returns:
trueif user-provided timestamps are allowed,falseotherwise.
-
setUserTimestampsEnabled
public void setUserTimestampsEnabled(boolean enabled)
Description copied from interface:GuardrailsMBeanSets whether user-provided timestamps are allowed.- Specified by:
setUserTimestampsEnabledin interfaceGuardrailsMBean- Parameters:
enabled-trueif user-provided timestamps are allowed,falseotherwise.
-
getAllowFilteringEnabled
public boolean getAllowFilteringEnabled()
Description copied from interface:GuardrailsMBeanReturns whether ALLOW FILTERING property is allowed.- Specified by:
getAllowFilteringEnabledin interfaceGuardrailsMBean- Returns:
trueif ALLOW FILTERING is allowed,falseotherwise.
-
setAllowFilteringEnabled
public void setAllowFilteringEnabled(boolean enabled)
Description copied from interface:GuardrailsMBeanSets whether ALLOW FILTERING is allowed.- Specified by:
setAllowFilteringEnabledin interfaceGuardrailsMBean- Parameters:
enabled-trueif ALLOW FILTERING is allowed,falseotherwise.
-
getUncompressedTablesEnabled
public boolean getUncompressedTablesEnabled()
Description copied from interface:GuardrailsMBeanReturns whether users can disable compression on tables- Specified by:
getUncompressedTablesEnabledin interfaceGuardrailsMBean- Returns:
trueif users can disable compression on a table,falseotherwise.
-
setUncompressedTablesEnabled
public void setUncompressedTablesEnabled(boolean enabled)
Description copied from interface:GuardrailsMBeanSets whether users can disable compression on tables- Specified by:
setUncompressedTablesEnabledin interfaceGuardrailsMBean- Parameters:
enabled-trueif users can disable compression on a table,falseotherwise.
-
getCompactTablesEnabled
public boolean getCompactTablesEnabled()
Description copied from interface:GuardrailsMBeanReturns whether users can create new COMPACT STORAGE tables- Specified by:
getCompactTablesEnabledin interfaceGuardrailsMBean- Returns:
trueif allowed,falseotherwise.
-
setCompactTablesEnabled
public void setCompactTablesEnabled(boolean enabled)
Description copied from interface:GuardrailsMBeanSets whether users can create new COMPACT STORAGE tables- Specified by:
setCompactTablesEnabledin interfaceGuardrailsMBean- Parameters:
enabled-trueif allowed,falseotherwise.
-
getGroupByEnabled
public boolean getGroupByEnabled()
Description copied from interface:GuardrailsMBeanReturns whether GROUP BY queries are allowed.- Specified by:
getGroupByEnabledin interfaceGuardrailsMBean- Returns:
trueif allowed,falseotherwise.
-
setGroupByEnabled
public void setGroupByEnabled(boolean enabled)
Description copied from interface:GuardrailsMBeanSets whether GROUP BY queries are allowed.- Specified by:
setGroupByEnabledin interfaceGuardrailsMBean- Parameters:
enabled-trueif allowed,falseotherwise.
-
getDropTruncateTableEnabled
public boolean getDropTruncateTableEnabled()
Description copied from interface:GuardrailsMBeanReturns whether users can TRUNCATE or DROP TABLE- Specified by:
getDropTruncateTableEnabledin interfaceGuardrailsMBean- Returns:
trueif allowed,falseotherwise.
-
setDropTruncateTableEnabled
public void setDropTruncateTableEnabled(boolean enabled)
Description copied from interface:GuardrailsMBeanSets whether users can TRUNCATE or DROP TABLE- Specified by:
setDropTruncateTableEnabledin interfaceGuardrailsMBean
-
getPageSizeWarnThreshold
public int getPageSizeWarnThreshold()
- Specified by:
getPageSizeWarnThresholdin interfaceGuardrailsMBean- Returns:
- The threshold to warn when requested page size greater than threshold. -1 means disabled.
-
getPageSizeFailThreshold
public int getPageSizeFailThreshold()
- Specified by:
getPageSizeFailThresholdin interfaceGuardrailsMBean- 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:
setPageSizeThresholdin interfaceGuardrailsMBean- 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:GuardrailsMBeanReturns whether list operations that require read before write are allowed.- Specified by:
getReadBeforeWriteListOperationsEnabledin interfaceGuardrailsMBean- Returns:
trueif list operations that require read before write are allowed,falseotherwise.
-
setReadBeforeWriteListOperationsEnabled
public void setReadBeforeWriteListOperationsEnabled(boolean enabled)
Description copied from interface:GuardrailsMBeanSets whether list operations that require read before write are allowed.- Specified by:
setReadBeforeWriteListOperationsEnabledin interfaceGuardrailsMBean- Parameters:
enabled-trueif list operations that require read before write are allowed,falseotherwise.
-
getPartitionKeysInSelectWarnThreshold
public int getPartitionKeysInSelectWarnThreshold()
- Specified by:
getPartitionKeysInSelectWarnThresholdin interfaceGuardrailsMBean- 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:
getPartitionKeysInSelectFailThresholdin interfaceGuardrailsMBean- 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:
setPartitionKeysInSelectThresholdin interfaceGuardrailsMBean- 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:
getCollectionSizeWarnThresholdin interfaceGuardrailsMBean- Returns:
- The threshold to warn when encountering larger size of collection data than threshold, as a string
formatted as in, for example,
10GiB,20MiB,30KiBor40B. Anullvalue means that the threshold is disabled.
-
getCollectionSizeFailThreshold
@Nullable public java.lang.String getCollectionSizeFailThreshold()
- Specified by:
getCollectionSizeFailThresholdin interfaceGuardrailsMBean- Returns:
- The threshold to prevent collections with larger data size than threshold, as a string formatted as in,
for example,
10GiB,20MiB,30KiBor40B. Anullvalue means that the threshold is disabled.
-
setCollectionSizeThreshold
public void setCollectionSizeThreshold(@Nullable java.lang.String warnSize, @Nullable java.lang.String failSize)- Specified by:
setCollectionSizeThresholdin interfaceGuardrailsMBean- 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,30KiBor40B. Anullvalue means disabled.failSize- The threshold to prevent collections with larger data size than threshold, as a string formatted as in, for example,10GiB,20MiB,30KiBor40B. Anullvalue means disabled.
-
getItemsPerCollectionWarnThreshold
public int getItemsPerCollectionWarnThreshold()
- Specified by:
getItemsPerCollectionWarnThresholdin interfaceGuardrailsMBean- Returns:
- The threshold to warn when encountering more elements in a collection than threshold.
-
getItemsPerCollectionFailThreshold
public int getItemsPerCollectionFailThreshold()
- Specified by:
getItemsPerCollectionFailThresholdin interfaceGuardrailsMBean- Returns:
- The threshold to prevent collections with more elements than threshold.
-
setItemsPerCollectionThreshold
public void setItemsPerCollectionThreshold(int warn, int fail)- Specified by:
setItemsPerCollectionThresholdin interfaceGuardrailsMBean- 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:
getInSelectCartesianProductWarnThresholdin interfaceGuardrailsMBean- 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:
getInSelectCartesianProductFailThresholdin interfaceGuardrailsMBean- 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:
setInSelectCartesianProductThresholdin interfaceGuardrailsMBean- 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:
getReadConsistencyLevelsWarnedin interfaceGuardrailsMBean- Returns:
- consistency levels that are warned about when reading.
-
getReadConsistencyLevelsWarnedCSV
public java.lang.String getReadConsistencyLevelsWarnedCSV()
- Specified by:
getReadConsistencyLevelsWarnedCSVin interfaceGuardrailsMBean- 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:
setReadConsistencyLevelsWarnedin interfaceGuardrailsMBean- Parameters:
consistencyLevels- consistency levels that are warned about when reading.
-
setReadConsistencyLevelsWarnedCSV
public void setReadConsistencyLevelsWarnedCSV(java.lang.String consistencyLevels)
- Specified by:
setReadConsistencyLevelsWarnedCSVin interfaceGuardrailsMBean- 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:
getReadConsistencyLevelsDisallowedin interfaceGuardrailsMBean- Returns:
- consistency levels that are not allowed when reading.
-
getReadConsistencyLevelsDisallowedCSV
public java.lang.String getReadConsistencyLevelsDisallowedCSV()
- Specified by:
getReadConsistencyLevelsDisallowedCSVin interfaceGuardrailsMBean- 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:
setReadConsistencyLevelsDisallowedin interfaceGuardrailsMBean- Parameters:
consistencyLevels- consistency levels that are not allowed when reading.
-
setReadConsistencyLevelsDisallowedCSV
public void setReadConsistencyLevelsDisallowedCSV(java.lang.String consistencyLevels)
- Specified by:
setReadConsistencyLevelsDisallowedCSVin interfaceGuardrailsMBean- 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:
getWriteConsistencyLevelsWarnedin interfaceGuardrailsMBean- Returns:
- consistency levels that are warned about when writing.
-
getWriteConsistencyLevelsWarnedCSV
public java.lang.String getWriteConsistencyLevelsWarnedCSV()
- Specified by:
getWriteConsistencyLevelsWarnedCSVin interfaceGuardrailsMBean- 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:
setWriteConsistencyLevelsWarnedin interfaceGuardrailsMBean- Parameters:
consistencyLevels- consistency levels that are warned about when writing.
-
setWriteConsistencyLevelsWarnedCSV
public void setWriteConsistencyLevelsWarnedCSV(java.lang.String consistencyLevels)
- Specified by:
setWriteConsistencyLevelsWarnedCSVin interfaceGuardrailsMBean- 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:
getWriteConsistencyLevelsDisallowedin interfaceGuardrailsMBean- Returns:
- consistency levels that are not allowed when writing.
-
getWriteConsistencyLevelsDisallowedCSV
public java.lang.String getWriteConsistencyLevelsDisallowedCSV()
- Specified by:
getWriteConsistencyLevelsDisallowedCSVin interfaceGuardrailsMBean- 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:
setWriteConsistencyLevelsDisallowedin interfaceGuardrailsMBean- Parameters:
consistencyLevels- consistency levels that are not allowed when writing.
-
setWriteConsistencyLevelsDisallowedCSV
public void setWriteConsistencyLevelsDisallowedCSV(java.lang.String consistencyLevels)
- Specified by:
setWriteConsistencyLevelsDisallowedCSVin interfaceGuardrailsMBean- Parameters:
consistencyLevels- Comma-separated list of consistency levels that are not allowed when writing.
-
getFieldsPerUDTWarnThreshold
public int getFieldsPerUDTWarnThreshold()
- Specified by:
getFieldsPerUDTWarnThresholdin interfaceGuardrailsMBean- Returns:
- The threshold to warn when creating a UDT with more fields than threshold. -1 means disabled.
-
getFieldsPerUDTFailThreshold
public int getFieldsPerUDTFailThreshold()
- Specified by:
getFieldsPerUDTFailThresholdin interfaceGuardrailsMBean- 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:
setFieldsPerUDTThresholdin interfaceGuardrailsMBean- 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:
getDataDiskUsagePercentageWarnThresholdin interfaceGuardrailsMBean- 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:
getDataDiskUsagePercentageFailThresholdin interfaceGuardrailsMBean- 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:
setDataDiskUsagePercentageThresholdin interfaceGuardrailsMBean- 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:
getDataDiskUsageMaxDiskSizein interfaceGuardrailsMBean- Returns:
- The max disk size of the data directories when calculating disk usage thresholds, as a string formatted
as in, for example,
10GiB,20MiB,30KiBor40B. Anullvalue means disabled.
-
setDataDiskUsageMaxDiskSize
public void setDataDiskUsageMaxDiskSize(@Nullable java.lang.String size)- Specified by:
setDataDiskUsageMaxDiskSizein interfaceGuardrailsMBean- 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,30KiBor40B. Anullvalue means disabled.
-
getMinimumReplicationFactorWarnThreshold
public int getMinimumReplicationFactorWarnThreshold()
- Specified by:
getMinimumReplicationFactorWarnThresholdin interfaceGuardrailsMBean- Returns:
- The threshold to warn when replication factor is lesser threshold.
-
getMinimumReplicationFactorFailThreshold
public int getMinimumReplicationFactorFailThreshold()
- Specified by:
getMinimumReplicationFactorFailThresholdin interfaceGuardrailsMBean- Returns:
- The threshold to fail when replication factor is lesser threshold.
-
setMinimumReplicationFactorThreshold
public void setMinimumReplicationFactorThreshold(int warn, int fail)- Specified by:
setMinimumReplicationFactorThresholdin interfaceGuardrailsMBean- 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.
-
-