org.apache.cassandra.io.sstable.format

## Interface SSTableFlushObserver

All Known Implementing Classes:
  PerSSTableIndexWriter

    public interface SSTableFlushObserver

Observer for events in the lifecycle of writing out an sstable.

### Method Summary

All Methods Instance Methods Abstract Methods
`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.
`void` `nextUnfilteredCluster(Unfiltered unfilteredCluster)` Called after the unfiltered cluster is written to the sstable.
`void` `startPartition(DecoratedKey key, long indexPosition)` Called when a new partition in being written to the sstable, but before any cells are processed (see `nextUnfilteredCluster(Unfiltered)`).

### Method Detail

#### begin

    void begin()

Called before writing any data to the sstable.

#### startPartition

    void startPartition(DecoratedKey key,
                        long indexPosition)

Called when a new partition in being written to the sstable, but before any cells are processed (see `nextUnfilteredCluster(Unfiltered)`).

Parameters:
  `key` - The key being appended to SSTable.
  `indexPosition` - The position of the key in the SSTable PRIMARY_INDEX file.

#### nextUnfilteredCluster

    void nextUnfilteredCluster(Unfiltered unfilteredCluster)

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.

Parameters:
  `unfilteredCluster` - The unfiltered cluster being added to SSTable.

#### complete

    void complete()

Called when all data is written to the file and it's ready to be finished up.