org.apache.cassandra.db

## Class ColumnIndex.Builder

- java.lang.Object
- - org.apache.cassandra.db.ColumnIndex.Builder

- Enclosing class:
    ColumnIndex

      public static class ColumnIndex.Builder
      extends java.lang.Object

  Help to create an index for a column family based on size of columns, and write said columns to disk.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ColumnIndex.Builder(ColumnFamily cf, java.nio.ByteBuffer key, java.io.DataOutput output)`
    `ColumnIndex.Builder(ColumnFamily cf, java.nio.ByteBuffer key, java.io.DataOutput output, boolean fromStream)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(OnDiskAtom column)`
    `ColumnIndex` | `build()`
    `ColumnIndex` | `build(ColumnFamily cf)` Serializes the index into in-memory structure with all required components such as Bloom Filter, index block size, IndexInfo list
    `ColumnIndex` | `build(java.lang.Iterable<OnDiskAtom> columns)`
    `RangeTombstone.Tracker` | `tombstoneTracker()`
    `int` | `writtenAtomCount()`

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

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

- - ### Constructor Detail

    - #### ColumnIndex.Builder

          public ColumnIndex.Builder(ColumnFamily cf,
                             java.nio.ByteBuffer key,
                             java.io.DataOutput output,
                             boolean fromStream)

    - #### ColumnIndex.Builder

          public ColumnIndex.Builder(ColumnFamily cf,
                             java.nio.ByteBuffer key,
                             java.io.DataOutput output)

  - ### Method Detail

    - #### tombstoneTracker

          public RangeTombstone.Tracker tombstoneTracker()

    - #### writtenAtomCount

          public int writtenAtomCount()

    - #### build

          public ColumnIndex build(ColumnFamily cf)
                            throws java.io.IOException

      Serializes the index into in-memory structure with all required components such as Bloom Filter, index block size, IndexInfo list
      Parameters:
        `cf` - Column family to create index for
      Returns:
        information about index - it's Bloom Filter, block size and IndexInfo list
      Throws:
        `java.io.IOException`

    - #### build

          public ColumnIndex build(java.lang.Iterable<OnDiskAtom> columns)
                            throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### add

          public void add(OnDiskAtom column)
                   throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### build

          public ColumnIndex build()

Copyright © 2014 The Apache Software Foundation