org.apache.cassandra.index.sasi.utils

## Class MappedBuffer

- java.lang.Object
- - org.apache.cassandra.index.sasi.utils.MappedBuffer

- All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

      public class MappedBuffer
      extends java.lang.Object
      implements java.io.Closeable

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `` | `MappedBuffer(ChannelProxy file)`
    `protected` | `MappedBuffer(ChannelProxy file, int numPageBits)`
    `` | `MappedBuffer(RandomAccessReader file)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `capacity()`
    `void` | `close()`
    `int` | `comparePageTo(long offset, int length, AbstractType<?> comparator, java.nio.ByteBuffer other)`
    `MappedBuffer` | `duplicate()`
    `byte` | `get()`
    `byte` | `get(long pos)`
    `int` | `getInt()`
    `int` | `getInt(long pos)`
    `long` | `getLong()`
    `long` | `getLong(long pos)`
    `java.nio.ByteBuffer` | `getPageRegion(long position, int length)`
    `short` | `getShort()`
    `short` | `getShort(long pos)`
    `boolean` | `hasRemaining()`
    `long` | `limit()`
    `MappedBuffer` | `limit(long newLimit)`
    `long` | `position()`
    `MappedBuffer` | `position(long newPosition)`
    `long` | `remaining()`

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

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

- - ### Constructor Detail

    - #### MappedBuffer

          public MappedBuffer(RandomAccessReader file)

    - #### MappedBuffer

          public MappedBuffer(ChannelProxy file)

    - #### MappedBuffer

          protected MappedBuffer(ChannelProxy file,
                                 int numPageBits)

  - ### Method Detail

    - #### comparePageTo

          public int comparePageTo(long offset,
                                   int length,
                                   AbstractType<?> comparator,
                                   java.nio.ByteBuffer other)

    - #### capacity

          public long capacity()

    - #### position

          public long position()

    - #### position

          public MappedBuffer position(long newPosition)

    - #### limit

          public long limit()

    - #### limit

          public MappedBuffer limit(long newLimit)

    - #### remaining

          public long remaining()

    - #### hasRemaining

          public boolean hasRemaining()

    - #### get

          public byte get()

    - #### get

          public byte get(long pos)

    - #### getShort

          public short getShort()

    - #### getShort

          public short getShort(long pos)

    - #### getInt

          public int getInt()

    - #### getInt

          public int getInt(long pos)

    - #### getLong

          public long getLong()

    - #### getLong

          public long getLong(long pos)

    - #### getPageRegion

          public java.nio.ByteBuffer getPageRegion(long position,
                                                   int length)

    - #### duplicate

          public MappedBuffer duplicate()

    - #### close

          public void close()

      Specified by:
        `close` in interface `java.io.Closeable`
      Specified by:
        `close` in interface `java.lang.AutoCloseable`

Copyright © 2018 The Apache Software Foundation