org.apache.cassandra.io.compress

## Class CompressionParameters

- java.lang.Object
- - org.apache.cassandra.io.compress.CompressionParameters

    public class CompressionParameters
    extends java.lang.Object

### Field Summary

Fields
`static java.lang.String` `CHUNK_LENGTH_KB`
`static java.lang.String` `CRC_CHECK_CHANCE`
`static int` `DEFAULT_CHUNK_LENGTH`
`static double` `DEFAULT_CRC_CHECK_CHANCE`
`static java.util.Set<java.lang.String>` `GLOBAL_OPTIONS`
`java.util.Map<java.lang.String,java.lang.String>` `otherOptions`
`static IVersionedSerializer<CompressionParameters>` `serializer`
`static java.lang.String` `SSTABLE_COMPRESSION`
`ICompressor` `sstableCompressor`

### Constructor Summary

Constructors
Constructor and Description
`CompressionParameters(ICompressor sstableCompressor)`
`CompressionParameters(ICompressor sstableCompressor, java.lang.Integer chunkLength, java.util.Map<java.lang.String,java.lang.String> otherOptions)`
`CompressionParameters(java.lang.String sstableCompressorClass, java.lang.Integer chunkLength, java.util.Map<java.lang.String,java.lang.String> otherOptions)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`java.util.Map<java.lang.String,java.lang.String>` `asThriftOptions()`
`int` `chunkLength()`
`CompressionParameters` `copy()`
`static CompressionParameters` `create(java.util.Map<? extends java.lang.CharSequence,? extends java.lang.CharSequence> opts)`
`static ICompressor` `createCompressor(ParameterizedClass compression)`
`boolean` `equals(java.lang.Object obj)`
`double` `getCrcCheckChance()`
`int` `hashCode()`
`static java.lang.Integer` `parseChunkLength(java.lang.String chLengthKB)` Parse the chunk length (in KB) and returns it as bytes.
`void` `setCrcCheckChance(double crcCheckChance)`
`void` `setLiveMetadata(CFMetaData liveMetadata)`
`void` `validate()`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### DEFAULT_CHUNK_LENGTH

    public static final int DEFAULT_CHUNK_LENGTH

See Also:
  Constant Field Values

#### DEFAULT_CRC_CHECK_CHANCE

    public static final double DEFAULT_CRC_CHECK_CHANCE

See Also:
  Constant Field Values

#### serializer

    public static final IVersionedSerializer<CompressionParameters> serializer

#### SSTABLE_COMPRESSION

    public static final java.lang.String SSTABLE_COMPRESSION

See Also:
  Constant Field Values

#### CHUNK_LENGTH_KB

    public static final java.lang.String CHUNK_LENGTH_KB

See Also:
  Constant Field Values

#### CRC_CHECK_CHANCE

    public static final java.lang.String CRC_CHECK_CHANCE

See Also:
  Constant Field Values

#### GLOBAL_OPTIONS

    public static final java.util.Set<java.lang.String> GLOBAL_OPTIONS

#### sstableCompressor

    public final ICompressor sstableCompressor

#### otherOptions

    public final java.util.Map<java.lang.String,java.lang.String> otherOptions

### Constructor Detail

#### CompressionParameters

    public CompressionParameters(java.lang.String sstableCompressorClass,
                                 java.lang.Integer chunkLength,
                                 java.util.Map<java.lang.String,java.lang.String> otherOptions)
                          throws ConfigurationException

Throws:
  `ConfigurationException`

#### CompressionParameters

    public CompressionParameters(ICompressor sstableCompressor)

#### CompressionParameters

    public CompressionParameters(ICompressor sstableCompressor,
                                 java.lang.Integer chunkLength,
                                 java.util.Map<java.lang.String,java.lang.String> otherOptions)
                          throws ConfigurationException

Throws:
  `ConfigurationException`

### Method Detail

#### create

    public static CompressionParameters create(java.util.Map<? extends java.lang.CharSequence,? extends java.lang.CharSequence> opts)
                                        throws ConfigurationException

Throws:
  `ConfigurationException`

#### copy

    public CompressionParameters copy()

#### setLiveMetadata

    public void setLiveMetadata(CFMetaData liveMetadata)

#### setCrcCheckChance

    public void setCrcCheckChance(double crcCheckChance)
                           throws ConfigurationException

Throws:
  `ConfigurationException`

#### getCrcCheckChance

    public double getCrcCheckChance()

#### chunkLength

    public int chunkLength()

#### createCompressor

    public static ICompressor createCompressor(ParameterizedClass compression)
                                        throws ConfigurationException

Throws:
  `ConfigurationException`

#### parseChunkLength

    public static java.lang.Integer parseChunkLength(java.lang.String chLengthKB)
                                              throws ConfigurationException

Parse the chunk length (in KB) and returns it as bytes.

Parameters:
  `chLengthKB` - the length of the chunk to parse
Returns:
  the chunk length in bytes
Throws:
  `ConfigurationException` - if the chunk size is too large

#### validate

    public void validate()
                  throws ConfigurationException

Throws:
  `ConfigurationException`

#### asThriftOptions

    public java.util.Map<java.lang.String,java.lang.String> asThriftOptions()

#### equals

    public boolean equals(java.lang.Object obj)

Overrides:
  `equals` in class `java.lang.Object`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `java.lang.Object`