RangeTombstoneMarker.Merger (apache-cassandra API)
Date: 2018-02-14

org.apache.cassandra.db.rows

## Class RangeTombstoneMarker.Merger

- java.lang.Object
- - org.apache.cassandra.db.rows.RangeTombstoneMarker.Merger

- Enclosing interface:
    RangeTombstoneMarker

      public static class RangeTombstoneMarker.Merger
      extends java.lang.Object

  Utility class to help merging range tombstone markers coming from multiple inputs (UnfilteredRowIterators).

  The assumption that each individual input must validate and that we must preserve in the output is that every open marker has a corresponding close marker with the exact same deletion info, and that there is no other range tombstone marker between those open and close marker (of course, they could be rows in between). In other word, for any `UnfilteredRowIterator`, you only ever have to remenber the last open marker (if any) to have the full picture of what is deleted by range tombstones at any given point of iterating that iterator.

  Note that this class can merge both forward and reverse iterators. To deal with reverse, we just reverse how we deal with open and close markers (in forward order, we'll get open-close, open-close, ..., while in reverse we'll get close-open, close-open, ...).

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Merger(int size, DeletionTime partitionDeletion, boolean reversed)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `DeletionTime` | `activeDeletion()`
    `void` | `add(int i, RangeTombstoneMarker marker)`
    `void` | `clear()`
    `RangeTombstoneMarker` | `merge()`
    `RangeTombstoneMarker[]` | `mergedMarkers()`

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

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

- - ### Constructor Detail

    - #### Merger

          public Merger(int size,
                        DeletionTime partitionDeletion,
                        boolean reversed)

  - ### Method Detail

    - #### clear

          public void clear()

    - #### add

          public void add(int i,
                          RangeTombstoneMarker marker)

    - #### merge

          public RangeTombstoneMarker merge()

    - #### mergedMarkers

          public RangeTombstoneMarker[] mergedMarkers()

    - #### activeDeletion

          public DeletionTime activeDeletion()

Copyright © 2018 The Apache Software Foundation