private final class RawAsyncTableImpl.CheckAndMutateBuilderImpl extends Object implements AsyncTable.CheckAndMutateBuilder
Modifier and Type | Field and Description |
---|---|
private byte[] |
family |
private CompareOperator |
op |
private byte[] |
qualifier |
private byte[] |
row |
private TimeRange |
timeRange |
private byte[] |
value |
Constructor and Description |
---|
CheckAndMutateBuilderImpl(byte[] row,
byte[] family) |
Modifier and Type | Method and Description |
---|---|
AsyncTable.CheckAndMutateBuilder |
ifMatches(CompareOperator compareOp,
byte[] value)
Compare a value
|
AsyncTable.CheckAndMutateBuilder |
ifNotExists()
Check for lack of column.
|
private void |
preCheck() |
AsyncTable.CheckAndMutateBuilder |
qualifier(byte[] qualifier)
Match a qualifier.
|
CompletableFuture<Boolean> |
thenDelete(Delete delete)
Specify a Delete to commit if the check succeeds.
|
CompletableFuture<Boolean> |
thenMutate(RowMutations mutations)
Specify a RowMutations to commit if the check succeeds.
|
CompletableFuture<Boolean> |
thenPut(Put put)
Specify a Put to commit if the check succeeds.
|
AsyncTable.CheckAndMutateBuilder |
timeRange(TimeRange timeRange)
Match a timerange.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
ifEquals
private final byte[] row
private final byte[] family
private byte[] qualifier
private CompareOperator op
private byte[] value
public CheckAndMutateBuilderImpl(byte[] row, byte[] family)
public AsyncTable.CheckAndMutateBuilder qualifier(byte[] qualifier)
AsyncTable.CheckAndMutateBuilder
qualifier
in interface AsyncTable.CheckAndMutateBuilder
qualifier
- column qualifier to check.public AsyncTable.CheckAndMutateBuilder timeRange(TimeRange timeRange)
AsyncTable.CheckAndMutateBuilder
timeRange
in interface AsyncTable.CheckAndMutateBuilder
timeRange
- time range to check.public AsyncTable.CheckAndMutateBuilder ifNotExists()
AsyncTable.CheckAndMutateBuilder
ifNotExists
in interface AsyncTable.CheckAndMutateBuilder
public AsyncTable.CheckAndMutateBuilder ifMatches(CompareOperator compareOp, byte[] value)
AsyncTable.CheckAndMutateBuilder
ifMatches
in interface AsyncTable.CheckAndMutateBuilder
compareOp
- comparison operator to usevalue
- the expected valueprivate void preCheck()
public CompletableFuture<Boolean> thenPut(Put put)
AsyncTable.CheckAndMutateBuilder
thenPut
in interface AsyncTable.CheckAndMutateBuilder
put
- data to put if check succeedstrue
if the new put was executed, false
otherwise. The return value
will be wrapped by a CompletableFuture
.public CompletableFuture<Boolean> thenDelete(Delete delete)
AsyncTable.CheckAndMutateBuilder
thenDelete
in interface AsyncTable.CheckAndMutateBuilder
delete
- data to delete if check succeedstrue
if the new delete was executed, false
otherwise. The return
value will be wrapped by a CompletableFuture
.public CompletableFuture<Boolean> thenMutate(RowMutations mutations)
AsyncTable.CheckAndMutateBuilder
thenMutate
in interface AsyncTable.CheckAndMutateBuilder
mutations
- mutations to perform if check succeedsCompletableFuture
.Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.