org.apache.cassandra.index.sasi.disk

## Class OnDiskBlock<T extends Term>

- java.lang.Object
- - org.apache.cassandra.index.sasi.disk.OnDiskBlock<T>

Direct Known Subclasses:
  OnDiskIndex.DataBlock, OnDiskIndex.PointerBlock

    public abstract class OnDiskBlock<T extends Term>
    extends java.lang.Object

### Nested Class Summary

Nested Classes
`static class` `OnDiskBlock.BlockType`
`static class` `OnDiskBlock.SearchResult<T>`

### Field Summary

Fields
`protected MappedBuffer` `blockIndex`
`protected int` `blockIndexSize`
`protected TokenTree` `combinedIndex`
`protected boolean` `hasCombinedIndex`

### Constructor Summary

Constructors
Constructor and Description
`OnDiskBlock(Descriptor descriptor, MappedBuffer block, OnDiskBlock.BlockType blockType)`

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`protected abstract T` `cast(MappedBuffer data)`
`TokenTree` `getBlockIndex()`
`protected T` `getTerm(int index)`
`protected long` `getTermPosition(int idx)`
`int` `maxOffset(OnDiskIndex.IteratorOrder order)`
`int` `minOffset(OnDiskIndex.IteratorOrder order)`
`OnDiskBlock.SearchResult<T>` `search(AbstractType<?> comparator, java.nio.ByteBuffer query)`
`protected int` `termCount()`

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

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

### Field Detail

#### blockIndex

    protected final MappedBuffer blockIndex

#### blockIndexSize

    protected final int blockIndexSize

#### hasCombinedIndex

    protected final boolean hasCombinedIndex

#### combinedIndex

    protected final TokenTree combinedIndex

### Constructor Detail

#### OnDiskBlock

    public OnDiskBlock(Descriptor descriptor,
                       MappedBuffer block,
                       OnDiskBlock.BlockType blockType)

### Method Detail

#### search

    public OnDiskBlock.SearchResult<T> search(AbstractType<?> comparator,
                                              java.nio.ByteBuffer query)

#### getTerm

    protected T getTerm(int index)

#### getTermPosition

    protected long getTermPosition(int idx)

#### termCount

    protected int termCount()

#### cast

    protected abstract T cast(MappedBuffer data)

#### getBlockIndex

    public TokenTree getBlockIndex()

#### minOffset

    public int minOffset(OnDiskIndex.IteratorOrder order)

#### maxOffset

    public int maxOffset(OnDiskIndex.IteratorOrder order)