Class TableOptions.CompactionOptions<T extends TableOptions.CompactionOptions>

    • Method Detail

      • enabled

        public T enabled​(Boolean enabled)
        Enable or disable background compaction.

        If no call is made to this method, the default value set by Cassandra is {code true}.

        Parameters:
        enabled - whether to enable background compaction for the table.
        Returns:
        this object (for call chaining).
      • tombstoneCompactionIntervalInDay

        public T tombstoneCompactionIntervalInDay​(Integer tombstoneCompactionInterval)
        Define the minimum number of days to wait after an SSTable creation time before considering the SSTable for tombstone compaction. Tombstone compaction is the compaction triggered if the SSTable has more garbage-collectable tombstones than tombstone_threshold.

        If no call is made to this method, the default value set by Cassandra is 1.

        Parameters:
        tombstoneCompactionInterval - the tombstone compaction interval in day.
        Returns:
        this object (for call chaining).
      • tombstoneThreshold

        public 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.

        If no call is made to this method, the default value set by Cassandra is 0.2.

        Parameters:
        tombstoneThreshold - the threshold.
        Returns:
        this object (for call chaining).
      • uncheckedTombstoneCompaction

        public T uncheckedTombstoneCompaction​(Boolean uncheckedTombstoneCompaction)
        Enables more aggressive than normal tombstone compactions. A single SSTable tombstone compaction runs without checking the likelihood of success (Cassandra 2.0.9 and later).

        If no call is made to this method, the default value set by Cassandra is {code false}.

        Parameters:
        uncheckedTombstoneCompaction - whether to enable the feature.
        Returns:
        this object (for call chaining).
      • freeformOption

        public T freeformOption​(String key,
                                Object value)
        Define a free-form option as a key/value pair.

        This method is provided as a fallback if the SchemaBuilder is used with a more recent version of Cassandra that has new, unsupported options.

        Parameters:
        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.
        Returns:
        this object (for call chaining).
      • build

        public abstract String build()