BTreeRow.Builder (apache-cassandra API)
Date: 2018-02-14

org.apache.cassandra.db.rows

## Class BTreeRow.Builder

- java.lang.Object
- - org.apache.cassandra.db.rows.BTreeRow.Builder

- All Implemented Interfaces:
    Row.Builder
  Enclosing class:
    BTreeRow

      public static class BTreeRow.Builder
      extends java.lang.Object
      implements Row.Builder

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Clustering` | `clustering`
    `protected Row.Deletion` | `deletion`
    `protected LivenessInfo` | `primaryKeyLivenessInfo`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `Builder(boolean isSorted)`
    `protected` | `Builder(boolean isSorted, int nowInSecs)`
    `protected` | `Builder(BTreeRow.Builder builder)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addCell(Cell cell)` Adds a cell to this builder.
    `void` | `addComplexDeletion(ColumnDefinition column, DeletionTime complexDeletion)` Adds a complex deletion.
    `void` | `addPrimaryKeyLivenessInfo(LivenessInfo info)` Adds the liveness information for the partition key columns of this row.
    `void` | `addRowDeletion(Row.Deletion deletion)` Adds the deletion information for this row.
    `Row` | `build()` Builds and return built row.
    `Clustering` | `clustering()` The clustering for the row that is currently being built.
    `BTreeRow.Builder` | `copy()` Creates a copy of this `Builder`.
    `boolean` | `isSorted()` Whether the builder is a sorted one or not.
    `void` | `newRow(Clustering clustering)` Prepares the builder to build a new row of clustering `clustering`.
    `protected void` | `reset()`

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

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

- - ### Field Detail

    - #### clustering

          protected Clustering clustering

    - #### primaryKeyLivenessInfo

          protected LivenessInfo primaryKeyLivenessInfo

    - #### deletion

          protected Row.Deletion deletion

  - ### Constructor Detail

    - #### Builder

          protected Builder(boolean isSorted)

    - #### Builder

          protected Builder(boolean isSorted,
                            int nowInSecs)

    - #### Builder

          protected Builder(BTreeRow.Builder builder)

  - ### Method Detail

    - #### copy

          public BTreeRow.Builder copy()

      Description copied from interface: `Row.Builder`
      Creates a copy of this `Builder`.
      Specified by:
        `copy` in interface `Row.Builder`
      Returns:
        a copy of this `Builder`

    - #### isSorted

          public boolean isSorted()

      Description copied from interface: `Row.Builder`
      Whether the builder is a sorted one or not.
      Specified by:
        `isSorted` in interface `Row.Builder`
      Returns:
        if the builder requires calls to be done in sorted order or not (see above).

    - #### newRow

          public void newRow(Clustering clustering)

      Description copied from interface: `Row.Builder`
      Prepares the builder to build a new row of clustering `clustering`.

      This should always be the first call for a given row.

      Specified by:
        `newRow` in interface `Row.Builder`
      Parameters:
        `clustering` - the clustering for the new row.

    - #### clustering

          public Clustering clustering()

      Description copied from interface: `Row.Builder`
      The clustering for the row that is currently being built.
      Specified by:
        `clustering` in interface `Row.Builder`
      Returns:
        the clustering for the row that is currently being built, or `null` if `Row.Builder.newRow(org.apache.cassandra.db.Clustering)` hasn't yet been called.

    - #### reset

          protected void reset()

    - #### addPrimaryKeyLivenessInfo

          public void addPrimaryKeyLivenessInfo(LivenessInfo info)

      Description copied from interface: `Row.Builder`
      Adds the liveness information for the partition key columns of this row. This call is optional (skipping it is equivalent to calling `addPartitionKeyLivenessInfo(LivenessInfo.NONE)`).
      Specified by:
        `addPrimaryKeyLivenessInfo` in interface `Row.Builder`
      Parameters:
        `info` - the liveness information for the partition key columns of the built row.

    - #### addRowDeletion

          public void addRowDeletion(Row.Deletion deletion)

      Description copied from interface: `Row.Builder`
      Adds the deletion information for this row. This call is optional and can be skipped if the row is not deleted.
      Specified by:
        `addRowDeletion` in interface `Row.Builder`
      Parameters:
        `deletion` - the row deletion time, or `Deletion.LIVE` if the row isn't deleted.

    - #### addCell

          public void addCell(Cell cell)

      Description copied from interface: `Row.Builder`
      Adds a cell to this builder.
      Specified by:
        `addCell` in interface `Row.Builder`
      Parameters:
        `cell` - the cell to add.

    - #### addComplexDeletion

          public void addComplexDeletion(ColumnDefinition column,
                                         DeletionTime complexDeletion)

      Description copied from interface: `Row.Builder`
      Adds a complex deletion.
      Specified by:
        `addComplexDeletion` in interface `Row.Builder`
      Parameters:
        `column` - the column for which to add the `complexDeletion`.
        `complexDeletion` - the complex deletion time to add.

    - #### build

          public Row build()

      Description copied from interface: `Row.Builder`
      Builds and return built row.
      Specified by:
        `build` in interface `Row.Builder`
      Returns:
        the last row built by this builder.

Copyright © 2018 The Apache Software Foundation