Interface PartitionUpdate.SimpleBuilder

All Known Implementing Classes:
SimpleBuilders.PartitionUpdateBuilder
Enclosing class:
PartitionUpdate

public static interface PartitionUpdate.SimpleBuilder
Interface for building partition updates geared towards human.

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

  • Method Details

    • metadata

      TableMetadata metadata()
      The metadata of the table this is a builder on.
    • timestamp

      PartitionUpdate.SimpleBuilder timestamp(long timestamp)
      Sets the timestamp to use for the following additions to this builder or any derived (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

      Sets the ttl to use for the following additions to this builder or any derived (row) builder.
      Parameters:
      ttl - the ttl to use for following additions. If that ttl hasn't been set, no ttl will be used.
      Returns:
      this builder.
    • nowInSec

      PartitionUpdate.SimpleBuilder nowInSec(long nowInSec)
      Sets the current time to use for the following additions to this builder or any derived (row) builder.
      Parameters:
      nowInSec - the current time to use for following additions. If the current time hasn't been set, the current time in seconds will be used.
      Returns:
      this builder.
    • row

      Row.SimpleBuilder row(Object... clusteringValues)
      Adds the row identifier by the provided clustering and return a builder for that row.
      Parameters:
      clusteringValues - the value for the clustering columns of the row to add to this build. There may be no values if either the table has no clustering column, or if you want to edit the static row. Note that as a shortcut it is also allowed to pass a Clustering object directly, in which case that should be the only argument.
      Returns:
      a builder for the row identified by clusteringValues.
    • delete

      Deletes the partition identified by this builder (using a partition level deletion).
      Returns:
      this builder.
    • addRangeTombstone

      Adds a new range tombstone to this update, returning a builder for that range.
      Returns:
      the range tombstone builder for the newly added range.
    • addRangeTombstone

      Adds a new range tombstone to this update
      Returns:
      this builder
    • build

      Build the update represented by this builder.
      Returns:
      the built update.
    • buildAsMutation

      Mutation buildAsMutation()
      As shortcut for new Mutation(build()).
      Returns:
      the built update, wrapped in a Mutation.