org.apache.cassandra.db

## Interface Mutation.SimpleBuilder

- All Known Implementing Classes:
    SimpleBuilders.MutationBuilder
  Enclosing class:
    Mutation

      public static interface Mutation.SimpleBuilder

  Interface for building mutations geared towards human.

  This should generally not be used when performance matters too much, but provides a more convenient interface to build a mutation than using the class constructor when performance is not of the utmost importance.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `Mutation` | `build()` Build the mutation represented by this builder.
    `Mutation.SimpleBuilder` | `timestamp(long timestamp)` Sets the timestamp to use for the following additions to this builder or any derived (update or row) builder.
    `Mutation.SimpleBuilder` | `ttl(int ttl)` Sets the ttl to use for the following additions to this builder or any derived (update or row) builder.
    `PartitionUpdate.SimpleBuilder` | `update(CFMetaData metadata)` Adds an update for table identified by the provided metadata and return a builder for that partition.
    `PartitionUpdate.SimpleBuilder` | `update(java.lang.String tableName)` Adds an update for table identified by the provided name and return a builder for that partition.

- - ### Method Detail

    - #### timestamp

          Mutation.SimpleBuilder timestamp(long timestamp)

      Sets the timestamp to use for the following additions to this builder or any derived (update or row) builder.
      Parameters:
        `timestamp` - the timestamp to use for following additions. If that timestamp hasn't been set, the current time in microseconds will be used.
      Returns:
        this builder.

    - #### ttl

          Mutation.SimpleBuilder ttl(int ttl)

      Sets the ttl to use for the following additions to this builder or any derived (update or row) builder.

      Note that the for non-compact tables, this method must be called before any column addition for this ttl to be used for the row `LivenessInfo`.

      Parameters:
        `ttl` - the ttl to use for following additions. If that ttl hasn't been set, no ttl will be used.
      Returns:
        this builder.

    - #### update

          PartitionUpdate.SimpleBuilder update(CFMetaData metadata)

      Adds an update for table identified by the provided metadata and return a builder for that partition.
      Parameters:
        `metadata` - the metadata of the table for which to add an update.
      Returns:
        a builder for the partition identified by `metadata` (and the partition key for which this is a mutation of).

    - #### update

          PartitionUpdate.SimpleBuilder update(java.lang.String tableName)

      Adds an update for table identified by the provided name and return a builder for that partition.
      Parameters:
        `tableName` - the name of the table for which to add an update.
      Returns:
        a builder for the partition identified by `metadata` (and the partition key for which this is a mutation of).

    - #### build

          Mutation build()

      Build the mutation represented by this builder.
      Returns:
        the built mutation.

Copyright © 2018 The Apache Software Foundation