public abstract static class TableOptions.CompactionOptions<T extends TableOptions.CompactionOptions> extends Object
To create instances, use SchemaBuilder.sizedTieredStategy()
, SchemaBuilder.leveledStrategy()
, SchemaBuilder.dateTieredStrategy()
or SchemaBuilder.timeWindowCompactionStrategy()
Modifier and Type | Class and Description |
---|---|
static class |
TableOptions.CompactionOptions.DateTieredCompactionStrategyOptions
Compaction options specific to the date-tiered strategy.
|
static class |
TableOptions.CompactionOptions.LeveledCompactionStrategyOptions
Compaction options specific to Leveled strategy
|
static class |
TableOptions.CompactionOptions.SizeTieredCompactionStrategyOptions
Compaction options specific to SizeTiered strategy
|
static class |
TableOptions.CompactionOptions.Strategy
Compaction strategies.
|
static class |
TableOptions.CompactionOptions.TimeWindowCompactionStrategyOptions
Compaction options specific to the time window strategy.
|
Modifier and Type | Method and Description |
---|---|
abstract String |
build() |
T |
enabled(Boolean enabled)
Enable or disable background compaction.
|
T |
freeformOption(String key,
Object value)
Define a free-form option as a key/value pair.
|
T |
tombstoneCompactionIntervalInDay(Integer tombstoneCompactionInterval)
Define the minimum number of days to wait after an SSTable creation time before considering
the SSTable for tombstone compaction.
|
T |
tombstoneThreshold(Double tombstoneThreshold)
Define the ratio of garbage-collectable tombstones to all contained columns, which if
exceeded by the SSTable triggers compaction (with no other SSTables) for the purpose of
purging the tombstones.
|
T |
uncheckedTombstoneCompaction(Boolean uncheckedTombstoneCompaction)
Enables more aggressive than normal tombstone compactions.
|
public T enabled(Boolean enabled)
If no call is made to this method, the default value set by Cassandra is {code true}.
enabled
- whether to enable background compaction for the table.public T tombstoneCompactionIntervalInDay(Integer tombstoneCompactionInterval)
If no call is made to this method, the default value set by Cassandra is 1.
tombstoneCompactionInterval
- the tombstone compaction interval in day.public T tombstoneThreshold(Double tombstoneThreshold)
If no call is made to this method, the default value set by Cassandra is 0.2.
tombstoneThreshold
- the threshold.public T uncheckedTombstoneCompaction(Boolean uncheckedTombstoneCompaction)
If no call is made to this method, the default value set by Cassandra is {code false}.
uncheckedTombstoneCompaction
- whether to enable the feature.public T freeformOption(String key, Object value)
This method is provided as a fallback if the SchemaBuilder is used with a more recent version of Cassandra that has new, unsupported options.
key
- the name of the option.value
- the value of the option. If it's a CharSequence
, it will be included in
single quotes, otherwise the result of invoking its toString
method will be used
unquoted.public abstract String build()
Copyright © 2012–2023. All rights reserved.