@InterfaceAudience.Public @InterfaceStability.Evolving public final class CheckAndMutate extends Object implements Row
Use the builder class to instantiate a CheckAndMutate object. This builder class is fluent style APIs, the code are like:
 
 // A CheckAndMutate operation where do the specified action if the column (specified by the
 // family and the qualifier) of the row equals to the specified value
 CheckAndMutate checkAndMutate = CheckAndMutate.newBuilder(row)
   .ifEquals(family, qualifier, value)
   .build(put);
 // A CheckAndMutate operation where do the specified action if the column (specified by the
 // family and the qualifier) of the row doesn't exist
 CheckAndMutate checkAndMutate = CheckAndMutate.newBuilder(row)
   .ifNotExists(family, qualifier)
   .build(put);
 // A CheckAndMutate operation where do the specified action if the row matches the filter
 CheckAndMutate checkAndMutate = CheckAndMutate.newBuilder(row)
   .ifMatches(filter)
   .build(delete);
 
 | Modifier and Type | Class and Description | 
|---|---|
| static class  | CheckAndMutate.BuilderA builder class for building a CheckAndMutate object. | 
| Modifier and Type | Field and Description | 
|---|---|
| private Row | action | 
| private byte[] | family | 
| private Filter | filter | 
| private CompareOperator | op | 
| private byte[] | qualifier | 
| private byte[] | row | 
| private TimeRange | timeRange | 
| private byte[] | value | 
COMPARATOR| Modifier | Constructor and Description | 
|---|---|
| private  | CheckAndMutate(byte[] row,
              byte[] family,
              byte[] qualifier,
              CompareOperator op,
              byte[] value,
              TimeRange timeRange,
              Row action) | 
| private  | CheckAndMutate(byte[] row,
              Filter filter,
              TimeRange timeRange,
              Row action) | 
| Modifier and Type | Method and Description | 
|---|---|
| int | compareTo(Row row) | 
| boolean | equals(Object obj) | 
| Row | getAction() | 
| CompareOperator | getCompareOp() | 
| byte[] | getFamily() | 
| Filter | getFilter() | 
| byte[] | getQualifier() | 
| byte[] | getRow() | 
| TimeRange | getTimeRange() | 
| byte[] | getValue() | 
| boolean | hasFilter() | 
| int | hashCode() | 
| static CheckAndMutate.Builder | newBuilder(byte[] row)returns a builder object to build a CheckAndMutate object | 
private final byte[] row
private final byte[] family
private final byte[] qualifier
private final CompareOperator op
private final byte[] value
private CheckAndMutate(byte[] row, byte[] family, byte[] qualifier, CompareOperator op, byte[] value, TimeRange timeRange, Row action)
private CheckAndMutate(byte[] row, Filter filter, TimeRange timeRange, Row action)
public static CheckAndMutate.Builder newBuilder(byte[] row)
row - rowpublic int compareTo(Row row)
compareTo in interface Comparable<Row>compareTo in interface Rowpublic byte[] getFamily()
public byte[] getQualifier()
public CompareOperator getCompareOp()
public byte[] getValue()
public boolean hasFilter()
public TimeRange getTimeRange()
Copyright © 2007–2021 The Apache Software Foundation. All rights reserved.