OnDiskIndex (apache-cassandra API)
Date: 2018-02-14

org.apache.cassandra.index.sasi.disk

## Class OnDiskIndex

- java.lang.Object
- - org.apache.cassandra.index.sasi.disk.OnDiskIndex

- All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, java.lang.Iterable<OnDiskIndex.DataTerm>

      public class OnDiskIndex
      extends java.lang.Object
      implements java.lang.Iterable<OnDiskIndex.DataTerm>, java.io.Closeable

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `protected class` | `OnDiskIndex.DataBlock`
    `protected class` | `OnDiskIndex.DataLevel`
    `class` | `OnDiskIndex.DataTerm`
    `static class` | `OnDiskIndex.IteratorOrder`
    `protected class` | `OnDiskIndex.Level<T extends OnDiskBlock>`
    `protected class` | `OnDiskIndex.OnDiskSuperBlock`
    `protected class` | `OnDiskIndex.PointerBlock`
    `protected class` | `OnDiskIndex.PointerLevel`
    `protected static class` | `OnDiskIndex.PointerTerm`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected AbstractType<?>` | `comparator`
    `protected OnDiskIndex.DataLevel` | `dataLevel`
    `Descriptor` | `descriptor`
    `protected boolean` | `hasMarkedPartials`
    `protected MappedBuffer` | `indexFile`
    `protected java.lang.String` | `indexPath`
    `protected long` | `indexSize`
    `protected com.google.common.base.Function<java.lang.Long,DecoratedKey>` | `keyFetcher`
    `protected OnDiskIndex.PointerLevel[]` | `levels`
    `protected java.nio.ByteBuffer` | `maxKey`
    `protected java.nio.ByteBuffer` | `maxTerm`
    `protected java.nio.ByteBuffer` | `minKey`
    `protected java.nio.ByteBuffer` | `minTerm`
    `protected OnDiskIndexBuilder.Mode` | `mode`
    `protected OnDiskIndexBuilder.TermSize` | `termSize`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `OnDiskIndex(java.io.File index, AbstractType<?> cmp, com.google.common.base.Function<java.lang.Long,DecoratedKey> keyReader)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `AbstractType<?>` | `getComparator()`
    `java.lang.String` | `getIndexPath()`
    `boolean` | `hasMarkedPartials()`
    `java.util.Iterator<OnDiskIndex.DataTerm>` | `iterator()`
    `java.util.Iterator<OnDiskIndex.DataTerm>` | `iteratorAt(java.nio.ByteBuffer query, OnDiskIndex.IteratorOrder order, boolean inclusive)`
    `OnDiskIndex.DataTerm` | `max()`
    `java.nio.ByteBuffer` | `maxKey()`
    `java.nio.ByteBuffer` | `maxTerm()`
    `OnDiskIndex.DataTerm` | `min()`
    `java.nio.ByteBuffer` | `minKey()`
    `java.nio.ByteBuffer` | `minTerm()`
    `OnDiskIndexBuilder.Mode` | `mode()`
    `RangeIterator<java.lang.Long,Token>` | `search(Expression exp)` Search for rows which match all of the terms inside the given expression in the index file.

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

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

    - ### Methods inherited from interface java.lang.Iterable

      `forEach, spliterator`

- - ### Field Detail

    - #### descriptor

          public final Descriptor descriptor

    - #### mode

          protected final OnDiskIndexBuilder.Mode mode

    - #### termSize

          protected final OnDiskIndexBuilder.TermSize termSize

    - #### comparator

          protected final AbstractType<?> comparator

    - #### indexFile

          protected final MappedBuffer indexFile

    - #### indexSize

          protected final long indexSize

    - #### hasMarkedPartials

          protected final boolean hasMarkedPartials

    - #### keyFetcher

          protected final com.google.common.base.Function<java.lang.Long,DecoratedKey> keyFetcher

    - #### indexPath

          protected final java.lang.String indexPath

    - #### levels

          protected final OnDiskIndex.PointerLevel[] levels

    - #### dataLevel

          protected final OnDiskIndex.DataLevel dataLevel

    - #### minTerm

          protected final java.nio.ByteBuffer minTerm

    - #### maxTerm

          protected final java.nio.ByteBuffer maxTerm

    - #### minKey

          protected final java.nio.ByteBuffer minKey

    - #### maxKey

          protected final java.nio.ByteBuffer maxKey

  - ### Constructor Detail

    - #### OnDiskIndex

          public OnDiskIndex(java.io.File index,
                             AbstractType<?> cmp,
                             com.google.common.base.Function<java.lang.Long,DecoratedKey> keyReader)

  - ### Method Detail

    - #### hasMarkedPartials

          public boolean hasMarkedPartials()

    - #### mode

          public OnDiskIndexBuilder.Mode mode()

    - #### minTerm

          public java.nio.ByteBuffer minTerm()

    - #### maxTerm

          public java.nio.ByteBuffer maxTerm()

    - #### minKey

          public java.nio.ByteBuffer minKey()

    - #### maxKey

          public java.nio.ByteBuffer maxKey()

    - #### min

          public OnDiskIndex.DataTerm min()

    - #### max

          public OnDiskIndex.DataTerm max()

    - #### search

          public RangeIterator<java.lang.Long,Token> search(Expression exp)

      Search for rows which match all of the terms inside the given expression in the index file.
      Parameters:
        `exp` - The expression to use for the query.
      Returns:
        Iterator which contains rows for all of the terms from the given range.

    - #### iteratorAt

          public java.util.Iterator<OnDiskIndex.DataTerm> iteratorAt(java.nio.ByteBuffer query,
                                                                     OnDiskIndex.IteratorOrder order,
                                                                     boolean inclusive)

    - #### iterator

          public java.util.Iterator<OnDiskIndex.DataTerm> iterator()

      Specified by:
        `iterator` in interface `java.lang.Iterable<OnDiskIndex.DataTerm>`

    - #### close

          public void close()
                     throws java.io.IOException

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

    - #### getComparator

          public AbstractType<?> getComparator()

    - #### getIndexPath

          public java.lang.String getIndexPath()

Copyright © 2018 The Apache Software Foundation