public interface RelationOptions<SelfT extends RelationOptions<SelfT>> extends OptionProvider<SelfT>
Modifier and Type | Method and Description |
---|---|
default SelfT |
withBloomFilterFpChance(double bloomFilterFpChance)
Defines the false-positive probability for SSTable bloom filters.
|
default SelfT |
withCaching(boolean keys,
SchemaBuilder.RowsPerPartition rowsPerPartition)
Defines the caching criteria.
|
default SelfT |
withCDC(boolean enabled)
Defines whether or not change data capture is enabled.
|
default SelfT |
withComment(String comment)
Defines documentation for this relation.
|
default SelfT |
withCompaction(CompactionStrategy<?> compactionStrategy)
Defines the compaction strategy to use.
|
default SelfT |
withCompression(String compressionAlgorithmName)
Configures compression using the given algorithm using the default configuration (64kb
chunk_length, and 1.0 crc_check_chance).
|
default SelfT |
withCompression(String compressionAlgorithmName,
int chunkLengthKB,
double crcCheckChance)
Configures compression using the given algorithm, chunk length and crc check chance.
|
default SelfT |
withDcLocalReadRepairChance(double dcLocalReadRepairChance)
Defines the probability of read repairs being invoked over all replicas in the current data
center.
|
default SelfT |
withDefaultTimeToLiveSeconds(int ttl)
Defines the default 'time to live' (expiration time) of writes in seconds.
|
default SelfT |
withDeflateCompression()
Configures compression using the Deflate algorithm using the default configuration (64kb
chunk_length, and 1.0 crc_check_chance).
|
default SelfT |
withDeflateCompression(int chunkLengthKB,
double crcCheckChance)
Configures compression using the Deflate algorithm with the given chunk length and crc check
chance.
|
default SelfT |
withGcGraceSeconds(int gcGraceSeconds)
Defines the time to wait before garbage collecting tombstones (deletion markers).
|
default SelfT |
withLZ4Compression()
Configures compression using the LZ4 algorithm using the default configuration (64kb
chunk_length, and 1.0 crc_check_chance).
|
default SelfT |
withLZ4Compression(int chunkLengthKB,
double crcCheckChance)
Configures compression using the LZ4 algorithm with the given chunk length and crc check
chance.
|
default SelfT |
withMaxIndexInterval(int max)
Defines the maximum index interval.
|
default SelfT |
withMemtableFlushPeriodInMs(int memtableFlushPeriodInMs)
Defines the memtable flush period in milliseconds.
|
default SelfT |
withMinIndexInterval(int min)
Defines the minimum index interval.
|
default SelfT |
withNoCompression()
Defines that compression should be disabled.
|
default SelfT |
withReadRepairChance(double readRepairChance)
Defines the probability with which read repairs should be invoked on non-quorum reads.
|
default SelfT |
withSnappyCompression()
Configures compression using the Snappy algorithm using the default configuration (64kb
chunk_length, and 1.0 crc_check_chance).
|
default SelfT |
withSnappyCompression(int chunkLengthKB,
double crcCheckChance)
Configures compression using the Snappy algorithm with the given chunk length and crc check
chance.
|
default SelfT |
withSpeculativeRetry(String speculativeRetry)
Defines the configuration for coordinator to replica speculative retries.
|
getOptions, withOption
@NonNull @CheckReturnValue default SelfT withBloomFilterFpChance(double bloomFilterFpChance)
If no call was made to this method, the default value set is:
@NonNull @CheckReturnValue default SelfT withCDC(boolean enabled)
Note that using this option with a version of Apache Cassandra less than 3.8 or DataStax Enterprise 5.0 will raise a syntax error.
If no call is made to this method, the default value set is false
.
@NonNull @CheckReturnValue default SelfT withCaching(boolean keys, @NonNull SchemaBuilder.RowsPerPartition rowsPerPartition)
If no call is made to this method, the default value is determined by the global caching properties in cassandra.yaml.
keys
- If true, caches all keys, otherwise none.rowsPerPartition
- Whether to cache ALL, NONE or the first N rows per partition.@NonNull @CheckReturnValue default SelfT withComment(@NonNull String comment)
@NonNull @CheckReturnValue default SelfT withCompaction(@NonNull CompactionStrategy<?> compactionStrategy)
@NonNull @CheckReturnValue default SelfT withLZ4Compression(int chunkLengthKB, double crcCheckChance)
withCompression(String, int, double)
@NonNull @CheckReturnValue default SelfT withLZ4Compression()
withCompression(String, int, double)
@NonNull @CheckReturnValue default SelfT withSnappyCompression(int chunkLengthKB, double crcCheckChance)
withCompression(String, int, double)
@NonNull @CheckReturnValue default SelfT withSnappyCompression()
withCompression(String, int, double)
@NonNull @CheckReturnValue default SelfT withDeflateCompression(int chunkLengthKB, double crcCheckChance)
withCompression(String, int, double)
@NonNull @CheckReturnValue default SelfT withDeflateCompression()
withCompression(String, int, double)
@NonNull @CheckReturnValue default SelfT withCompression(@NonNull String compressionAlgorithmName)
Unless specifying a custom compression algorithm implementation, it is recommended to use
withLZ4Compression()
, withSnappyCompression()
, or withDeflateCompression()
.
withCompression(String, int, double)
@NonNull @CheckReturnValue default SelfT withCompression(@NonNull String compressionAlgorithmName, int chunkLengthKB, double crcCheckChance)
Unless specifying a custom compression algorithm implementation, it is recommended to use
withLZ4Compression()
, withSnappyCompression()
, or withDeflateCompression()
.
compressionAlgorithmName
- The class name of the compression algorithm.chunkLengthKB
- The chunk length in KB of compression blocks. Defaults to 64.crcCheckChance
- The probability (0.0 to 1.0) that checksum will be checked on each read.
Defaults to 1.0.@NonNull @CheckReturnValue default SelfT withNoCompression()
@NonNull @CheckReturnValue default SelfT withDcLocalReadRepairChance(double dcLocalReadRepairChance)
If no call is made to this method, the default value set is 0.0.
dcLocalReadRepairChance
- the probability.TableOptions
object.@NonNull @CheckReturnValue default SelfT withDefaultTimeToLiveSeconds(int ttl)
If no call is made to this method, the default value is 0 (no TTL).
@NonNull @CheckReturnValue default SelfT withGcGraceSeconds(int gcGraceSeconds)
The default value allows a great deal of time for consistency to be achieved prior to deletion. In many deployments this interval can be reduced, and in a single-node cluster it can be safely set to zero.
If no call is made to this method, the default value set is 864000 secs (10 days).
@NonNull @CheckReturnValue default SelfT withMemtableFlushPeriodInMs(int memtableFlushPeriodInMs)
If set, this forces flushing of memtables after the specified time elapses.
If no call is made to this method, the default value is 0 (unset).
@NonNull @CheckReturnValue default SelfT withMinIndexInterval(int min)
If no call is made to this method, the default value set is 128.
@NonNull @CheckReturnValue default SelfT withMaxIndexInterval(int max)
If no call is made to this method, the default value set is 2048.
withMinIndexInterval(int)
@NonNull @CheckReturnValue default SelfT withReadRepairChance(double readRepairChance)
If no call is made to this method, the default value set is 0.1.
@NonNull @CheckReturnValue default SelfT withSpeculativeRetry(@NonNull String speculativeRetry)
This overrides the normal read timeout when read_repair_chance is not 1.0, sending a request to other replica(s) to service reads.
Valid values include:
Using the speculative retry property, you can configure rapid read protection in Cassandra 2.0.2 and later. Use this property to retry a request after some milliseconds have passed or after a percentile of the typical read latency has been reached, which is tracked per table.
If no call is made to this method, the default value set is 99percentile
.
Copyright © 2017–2022. All rights reserved.