Class TableOptions.CompactionOptions.TimeWindowCompactionStrategyOptions
- java.lang.Object
-
- com.datastax.driver.core.schemabuilder.TableOptions.CompactionOptions<TableOptions.CompactionOptions.TimeWindowCompactionStrategyOptions>
-
- com.datastax.driver.core.schemabuilder.TableOptions.CompactionOptions.TimeWindowCompactionStrategyOptions
-
- Enclosing class:
- TableOptions.CompactionOptions<T extends TableOptions.CompactionOptions>
public static class TableOptions.CompactionOptions.TimeWindowCompactionStrategyOptions extends TableOptions.CompactionOptions<TableOptions.CompactionOptions.TimeWindowCompactionStrategyOptions>
Compaction options specific to the time window strategy.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTableOptions.CompactionOptions.TimeWindowCompactionStrategyOptions.CompactionWindowUnitstatic classTableOptions.CompactionOptions.TimeWindowCompactionStrategyOptions.TimeStampResolution-
Nested classes/interfaces inherited from class com.datastax.driver.core.schemabuilder.TableOptions.CompactionOptions
TableOptions.CompactionOptions.DateTieredCompactionStrategyOptions, TableOptions.CompactionOptions.LeveledCompactionStrategyOptions, TableOptions.CompactionOptions.SizeTieredCompactionStrategyOptions, TableOptions.CompactionOptions.Strategy, TableOptions.CompactionOptions.TimeWindowCompactionStrategyOptions
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TableOptions.CompactionOptions.TimeWindowCompactionStrategyOptionsbucketHigh(Double bucketHigh)Size-tiered compaction strategy (STCS) is used in the newest window, this method sets the bucketHigh value used in STCS.TableOptions.CompactionOptions.TimeWindowCompactionStrategyOptionsbucketLow(Double bucketLow)Size-tiered compaction strategy (STCS) is used in the newest window, this method sets the bucketLow value used in STCS.Stringbuild()TableOptions.CompactionOptions.TimeWindowCompactionStrategyOptionscompactionWindowSize(Integer compactionWindowSize)Sets the number of units that make up a window.TableOptions.CompactionOptions.TimeWindowCompactionStrategyOptionscompactionWindowUnit(TableOptions.CompactionOptions.TimeWindowCompactionStrategyOptions.CompactionWindowUnit compactionWindowUnit)Sets the time unit used to define the window sizeTableOptions.CompactionOptions.TimeWindowCompactionStrategyOptionsmaxThreshold(Integer maxThreshold)Sets the maximum number of SSTables to allow in a minor compaction.TableOptions.CompactionOptions.TimeWindowCompactionStrategyOptionsminSSTableSizeInBytes(Long minSSTableSize)Size-tiered compaction strategy (STCS) is used in the newest window, this method sets the minSSTableSize value used in STCS.TableOptions.CompactionOptions.TimeWindowCompactionStrategyOptionsminThreshold(Integer minThreshold)Sets the minimum number of SSTables to trigger a minor compactionTableOptions.CompactionOptions.TimeWindowCompactionStrategyOptionstimestampResolution(TableOptions.CompactionOptions.TimeWindowCompactionStrategyOptions.TimeStampResolution timestampResolution)Sets the timestamp resolution, depending on the timestamp unit of the data you insert.TableOptions.CompactionOptions.TimeWindowCompactionStrategyOptionsunsafeAggressiveSSTableExpiration(Boolean unsafeAggressiveSSTableExpiration)Allow expired sstables to be dropped without checking if its data is shadowing other sstables.-
Methods inherited from class com.datastax.driver.core.schemabuilder.TableOptions.CompactionOptions
enabled, freeformOption, tombstoneCompactionIntervalInDay, tombstoneThreshold, uncheckedTombstoneCompaction
-
-
-
-
Method Detail
-
bucketHigh
public TableOptions.CompactionOptions.TimeWindowCompactionStrategyOptions bucketHigh(Double bucketHigh)
Size-tiered compaction strategy (STCS) is used in the newest window, this method sets the bucketHigh value used in STCS.If no call is made to this method, the default value set by Cassandra is 1.5.
- Parameters:
bucketHigh- the new value.- Returns:
- this object (for call chaining).
-
bucketLow
public TableOptions.CompactionOptions.TimeWindowCompactionStrategyOptions bucketLow(Double bucketLow)
Size-tiered compaction strategy (STCS) is used in the newest window, this method sets the bucketLow value used in STCS.If no call is made to this method, the default value set by Cassandra is 0.5.
- Parameters:
bucketLow- the new value.- Returns:
- this object (for call chaining).
-
compactionWindowUnit
public TableOptions.CompactionOptions.TimeWindowCompactionStrategyOptions compactionWindowUnit(TableOptions.CompactionOptions.TimeWindowCompactionStrategyOptions.CompactionWindowUnit compactionWindowUnit)
Sets the time unit used to define the window sizeIf no call is made to this method, the default value set by Cassandra is
DAYS.- Parameters:
compactionWindowUnit-TableOptions.CompactionOptions.TimeWindowCompactionStrategyOptions.CompactionWindowUnit.MINUTES,TableOptions.CompactionOptions.TimeWindowCompactionStrategyOptions.CompactionWindowUnit.HOURSorTableOptions.CompactionOptions.TimeWindowCompactionStrategyOptions.CompactionWindowUnit.DAYS.- Returns:
- this object (for call chaining).
-
compactionWindowSize
public TableOptions.CompactionOptions.TimeWindowCompactionStrategyOptions compactionWindowSize(Integer compactionWindowSize)
Sets the number of units that make up a window.If no call is made to this method, the default value set by Cassandra is 1.
- Parameters:
compactionWindowSize- the size of the first window.- Returns:
- this object (for call chaining).
-
minThreshold
public TableOptions.CompactionOptions.TimeWindowCompactionStrategyOptions minThreshold(Integer minThreshold)
Sets the minimum number of SSTables to trigger a minor compactionIf no call is made to this method, the default value set by Cassandra is 4.
- Parameters:
minThreshold- the new value.- Returns:
- this object (for call chaining).
-
maxThreshold
public TableOptions.CompactionOptions.TimeWindowCompactionStrategyOptions maxThreshold(Integer maxThreshold)
Sets the maximum number of SSTables to allow in a minor compaction.If no call is made to this method, the default value set by Cassandra is 32.
- Parameters:
maxThreshold- the new value.- Returns:
- this object (for call chaining).
-
minSSTableSizeInBytes
public TableOptions.CompactionOptions.TimeWindowCompactionStrategyOptions minSSTableSizeInBytes(Long minSSTableSize)
Size-tiered compaction strategy (STCS) is used in the newest window, this method sets the minSSTableSize value used in STCS.If no call is made to this method, the default value set by Cassandra is 52428800 (50 MB).
- Parameters:
minSSTableSize- the new value.- Returns:
- this object (for call chaining).
-
timestampResolution
public TableOptions.CompactionOptions.TimeWindowCompactionStrategyOptions timestampResolution(TableOptions.CompactionOptions.TimeWindowCompactionStrategyOptions.TimeStampResolution timestampResolution)
Sets the timestamp resolution, depending on the timestamp unit of the data you insert.If no call is made to this method, the default value set by Cassandra is
MICROSECONDS.- Parameters:
timestampResolution-TableOptions.CompactionOptions.TimeWindowCompactionStrategyOptions.TimeStampResolution.MICROSECONDSorTableOptions.CompactionOptions.TimeWindowCompactionStrategyOptions.TimeStampResolution.MILLISECONDS.- Returns:
- this object (for call chaining).
-
unsafeAggressiveSSTableExpiration
public TableOptions.CompactionOptions.TimeWindowCompactionStrategyOptions unsafeAggressiveSSTableExpiration(Boolean unsafeAggressiveSSTableExpiration)
Allow expired sstables to be dropped without checking if its data is shadowing other sstables. This is a potentially risky option that can lead to data loss or deleted data re-appearing.If no call is made to this method, the default value set by Cassandra is false.
- Parameters:
unsafeAggressiveSSTableExpiration- whether to enable unsafe aggressive sstable expiration option.- Returns:
- this object (for call chaining).
-
build
public String build()
- Specified by:
buildin classTableOptions.CompactionOptions<TableOptions.CompactionOptions.TimeWindowCompactionStrategyOptions>
-
-