org.apache.cassandra.index.sasi.disk

## Class PerSSTableIndexWriter

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

- All Implemented Interfaces:
    SSTableFlushObserver

      public class PerSSTableIndexWriter
      extends java.lang.Object
      implements SSTableFlushObserver

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `protected class` | `PerSSTableIndexWriter.Index`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.util.Map<ColumnDefinition,PerSSTableIndexWriter.Index>` | `indexes`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PerSSTableIndexWriter(AbstractType<?> keyValidator, Descriptor descriptor, OperationType source, java.util.Map<ColumnDefinition,ColumnIndex> supportedIndexes)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `begin()` Called before writing any data to the sstable.
    `void` | `complete()` Called when all data is written to the file and it's ready to be finished up.
    `boolean` | `equals(java.lang.Object o)`
    `Descriptor` | `getDescriptor()`
    `PerSSTableIndexWriter.Index` | `getIndex(ColumnDefinition columnDef)`
    `int` | `hashCode()`
    `protected long` | `maxMemorySize(ColumnIndex columnIndex)`
    `protected PerSSTableIndexWriter.Index` | `newIndex(ColumnIndex columnIndex)`
    `void` | `nextUnfilteredCluster(Unfiltered unfiltered)` Called after the unfiltered cluster is written to the sstable.
    `void` | `startPartition(DecoratedKey key, long curPosition)` Called when a new partition in being written to the sstable, but before any cells are processed (see `SSTableFlushObserver.nextUnfilteredCluster(Unfiltered)`).

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

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

- - ### Field Detail

    - #### indexes

          protected final java.util.Map<ColumnDefinition,PerSSTableIndexWriter.Index> indexes

  - ### Constructor Detail

    - #### PerSSTableIndexWriter

          public PerSSTableIndexWriter(AbstractType<?> keyValidator,
                                       Descriptor descriptor,
                                       OperationType source,
                                       java.util.Map<ColumnDefinition,ColumnIndex> supportedIndexes)

  - ### Method Detail

    - #### begin

          public void begin()

      Description copied from interface: `SSTableFlushObserver`
      Called before writing any data to the sstable.
      Specified by:
        `begin` in interface `SSTableFlushObserver`

    - #### startPartition

          public void startPartition(DecoratedKey key,
                                     long curPosition)

      Description copied from interface: `SSTableFlushObserver`
      Called when a new partition in being written to the sstable, but before any cells are processed (see `SSTableFlushObserver.nextUnfilteredCluster(Unfiltered)`).
      Specified by:
        `startPartition` in interface `SSTableFlushObserver`
      Parameters:
        `key` - The key being appended to SSTable.
        `curPosition` - The position of the key in the SSTable PRIMARY_INDEX file.

    - #### nextUnfilteredCluster

          public void nextUnfilteredCluster(Unfiltered unfiltered)

      Description copied from interface: `SSTableFlushObserver`
      Called after the unfiltered cluster is written to the sstable. Will be preceded by a call to `startPartition(DecoratedKey, long)`, and the cluster should be assumed to belong to that partition.
      Specified by:
        `nextUnfilteredCluster` in interface `SSTableFlushObserver`
      Parameters:
        `unfiltered` - The unfiltered cluster being added to SSTable.

    - #### complete

          public void complete()

      Description copied from interface: `SSTableFlushObserver`
      Called when all data is written to the file and it's ready to be finished up.
      Specified by:
        `complete` in interface `SSTableFlushObserver`

    - #### getIndex

          public PerSSTableIndexWriter.Index getIndex(ColumnDefinition columnDef)

    - #### getDescriptor

          public Descriptor getDescriptor()

    - #### newIndex

          protected PerSSTableIndexWriter.Index newIndex(ColumnIndex columnIndex)

    - #### maxMemorySize

          protected long maxMemorySize(ColumnIndex columnIndex)

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### equals

          public boolean equals(java.lang.Object o)

      Overrides:
        `equals` in class `java.lang.Object`

Copyright © 2018 The Apache Software Foundation