org.apache.cassandra.io.util

## Class CompressedSegmentedFile

- java.lang.Object
- - org.apache.cassandra.utils.concurrent.SharedCloseableImpl
  - - org.apache.cassandra.io.util.SegmentedFile
    - - org.apache.cassandra.io.util.CompressedSegmentedFile

- All Implemented Interfaces:
    java.lang.AutoCloseable, ICompressedFile, SharedCloseable

      public class CompressedSegmentedFile
      extends SegmentedFile
      implements ICompressedFile

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `CompressedSegmentedFile.Builder`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `CompressionMetadata` | `metadata`

    - ### Fields inherited from class org.apache.cassandra.io.util.SegmentedFile

      `channel, length, onDiskLength`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CompressedSegmentedFile(ChannelProxy channel, CompressionMetadata metadata)`
    `CompressedSegmentedFile(ChannelProxy channel, CompressionMetadata metadata, java.util.TreeMap<java.lang.Long,java.nio.MappedByteBuffer> chunkSegments)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ChannelProxy` | `channel()`
    `java.util.TreeMap<java.lang.Long,java.nio.MappedByteBuffer>` | `chunkSegments()`
    `RandomAccessReader` | `createReader()`
    `RandomAccessReader` | `createThrottledReader(com.google.common.util.concurrent.RateLimiter limiter)`
    `void` | `dropPageCache(long before)`
    `CompressionMetadata` | `getMetadata()`
    `CompressedSegmentedFile` | `sharedCopy()`

    - ### Methods inherited from class org.apache.cassandra.io.util.SegmentedFile

      `copyReadableBounds, getBuilder, getCompressedBuilder, getSegment, iterator, path, toString`

    - ### Methods inherited from class org.apache.cassandra.utils.concurrent.SharedCloseableImpl

      `close, close, isCleanedUp`

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### metadata

          public final CompressionMetadata metadata

  - ### Constructor Detail

    - #### CompressedSegmentedFile

          public CompressedSegmentedFile(ChannelProxy channel,
                                         CompressionMetadata metadata)

    - #### CompressedSegmentedFile

          public CompressedSegmentedFile(ChannelProxy channel,
                                         CompressionMetadata metadata,
                                         java.util.TreeMap<java.lang.Long,java.nio.MappedByteBuffer> chunkSegments)

  - ### Method Detail

    - #### channel

          public ChannelProxy channel()

      Specified by:
        `channel` in interface `ICompressedFile`

    - #### chunkSegments

          public java.util.TreeMap<java.lang.Long,java.nio.MappedByteBuffer> chunkSegments()

      Specified by:
        `chunkSegments` in interface `ICompressedFile`

    - #### sharedCopy

          public CompressedSegmentedFile sharedCopy()

      Specified by:
        `sharedCopy` in interface `SharedCloseable`
      Specified by:
        `sharedCopy` in class `SegmentedFile`
      Returns:
        a new instance of the object representing the same state and backed by the same underlying resources. Coordinates with the original (and other instances) when the underlying resource should be closed. Throws an exception if the shared resource has already been closed.

    - #### dropPageCache

          public void dropPageCache(long before)

      Overrides:
        `dropPageCache` in class `SegmentedFile`

    - #### createReader

          public RandomAccessReader createReader()

      Overrides:
        `createReader` in class `SegmentedFile`

    - #### createThrottledReader

          public RandomAccessReader createThrottledReader(com.google.common.util.concurrent.RateLimiter limiter)

      Overrides:
        `createThrottledReader` in class `SegmentedFile`

    - #### getMetadata

          public CompressionMetadata getMetadata()

      Specified by:
        `getMetadata` in interface `ICompressedFile`

Copyright © 2018 The Apache Software Foundation