Class CheckAndMutate.Builder

java.lang.Object
org.apache.hadoop.hbase.client.CheckAndMutate.Builder
Enclosing class:
CheckAndMutate

@Public @Evolving public static final class CheckAndMutate.Builder extends Object
A builder class for building a CheckAndMutate object.
  • Field Details

  • Constructor Details

    • Builder

      private Builder(byte[] row)
  • Method Details

    • ifNotExists

      public CheckAndMutate.Builder ifNotExists(byte[] family, byte[] qualifier)
      Check for lack of column
      Parameters:
      family - family to check
      qualifier - qualifier to check
      Returns:
      the CheckAndMutate object
    • ifEquals

      public CheckAndMutate.Builder ifEquals(byte[] family, byte[] qualifier, byte[] value)
      Check for equality
      Parameters:
      family - family to check
      qualifier - qualifier to check
      value - the expected value
      Returns:
      the CheckAndMutate object
    • ifMatches

      public CheckAndMutate.Builder ifMatches(byte[] family, byte[] qualifier, CompareOperator compareOp, byte[] value)
      Check for match
      Parameters:
      family - family to check
      qualifier - qualifier to check
      compareOp - comparison operator to use
      value - the expected value
      Returns:
      the CheckAndMutate object
    • ifMatches

      Check for match
      Parameters:
      filter - filter to check
      Returns:
      the CheckAndMutate object
    • timeRange

      Specify a timerange
      Parameters:
      timeRange - time range to check
      Returns:
      the CheckAndMutate object
    • preCheck

      private void preCheck(Row action)
    • build

      public CheckAndMutate build(Put put)
      Build the CheckAndMutate object
      Parameters:
      put - data to put if check succeeds
      Returns:
      a CheckAndMutate object
    • build

      public CheckAndMutate build(Delete delete)
      Build the CheckAndMutate object
      Parameters:
      delete - data to delete if check succeeds
      Returns:
      a CheckAndMutate object
    • build

      public CheckAndMutate build(Increment increment)
      Build the CheckAndMutate object with an Increment to commit if the check succeeds.
      Parameters:
      increment - data to increment if check succeeds
      Returns:
      a CheckAndMutate object
    • build

      public CheckAndMutate build(Append append)
      Build the CheckAndMutate object with an Append to commit if the check succeeds.
      Parameters:
      append - data to append if check succeeds
      Returns:
      a CheckAndMutate object
    • build

      public CheckAndMutate build(RowMutations mutations)
      Build the CheckAndMutate object with a RowMutations to commit if the check succeeds.
      Parameters:
      mutations - mutations to perform if check succeeds
      Returns:
      a CheckAndMutate object