CompressedChunkReader.Mmap (apache-cassandra API)
Date: 2018-02-14

org.apache.cassandra.io.util

## Class CompressedChunkReader.Mmap

- java.lang.Object
- - org.apache.cassandra.io.util.AbstractReaderFileProxy
  - - org.apache.cassandra.io.util.CompressedChunkReader
    - - org.apache.cassandra.io.util.CompressedChunkReader.Mmap

- All Implemented Interfaces:
    java.lang.AutoCloseable, ChunkReader, ReaderFileProxy, RebuffererFactory
  Enclosing class:
    CompressedChunkReader

      public static class CompressedChunkReader.Mmap
      extends CompressedChunkReader

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.cassandra.io.util.CompressedChunkReader

      `CompressedChunkReader.Mmap, CompressedChunkReader.Standard`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected MmappedRegions` | `regions`

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

      `channel, fileLength`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Mmap(ChannelProxy channel, CompressionMetadata metadata, MmappedRegions regions)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `void` | `readChunk(long position, java.nio.ByteBuffer uncompressed)` Read the chunk at the given position, attempting to fill the capacity of the given buffer.

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

      `chunkSize, getCrcCheckChance, instantiateRebufferer, preferredBufferType, toString`

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

      `channel, fileLength`

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

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

    - ### Methods inherited from interface org.apache.cassandra.io.util.ReaderFileProxy

      `channel, fileLength`

- - ### Field Detail

    - #### regions

          protected final MmappedRegions regions

  - ### Constructor Detail

    - #### Mmap

          public Mmap(ChannelProxy channel,
                      CompressionMetadata metadata,
                      MmappedRegions regions)

  - ### Method Detail

    - #### readChunk

          public void readChunk(long position,
                                java.nio.ByteBuffer uncompressed)

      Description copied from interface: `ChunkReader`
      Read the chunk at the given position, attempting to fill the capacity of the given buffer. The filled buffer must be positioned at 0, with limit set at the size of the available data. The source may have requirements for the positioning and/or size of the buffer (e.g. chunk-aligned and chunk-sized). These must be satisfied by the caller.

    - #### close

          public void close()

      Specified by:
        `close` in interface `java.lang.AutoCloseable`
      Specified by:
        `close` in interface `ReaderFileProxy`
      Overrides:
        `close` in class `AbstractReaderFileProxy`

Copyright © 2018 The Apache Software Foundation