private class ThriftTable.CheckAndMutateBuilderImpl extends Object implements Table.CheckAndMutateBuilder
Modifier and Type | Field and Description |
---|---|
private byte[] |
family |
private CompareOperator |
op |
private byte[] |
qualifier |
private byte[] |
row |
private byte[] |
value |
Constructor and Description |
---|
CheckAndMutateBuilderImpl(byte[] row,
byte[] family) |
Modifier and Type | Method and Description |
---|---|
Table.CheckAndMutateBuilder |
ifMatches(CompareOperator compareOp,
byte[] value)
Check for match.
|
Table.CheckAndMutateBuilder |
ifNotExists()
Check for lack of column.
|
private void |
preCheck() |
Table.CheckAndMutateBuilder |
qualifier(byte[] qualifier)
Specify a column qualifer
|
boolean |
thenDelete(Delete delete)
Specify a Delete to commit if the check succeeds.
|
boolean |
thenMutate(RowMutations mutation)
Specify a RowMutations to commit if the check succeeds.
|
boolean |
thenPut(Put put)
Specify a Put to commit if the check succeeds.
|
Table.CheckAndMutateBuilder |
timeRange(TimeRange timeRange)
Specify 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
CheckAndMutateBuilderImpl(byte[] row, byte[] family)
public Table.CheckAndMutateBuilder qualifier(byte[] qualifier)
Table.CheckAndMutateBuilder
qualifier
in interface Table.CheckAndMutateBuilder
qualifier
- column qualifier to check.public Table.CheckAndMutateBuilder timeRange(TimeRange timeRange)
Table.CheckAndMutateBuilder
timeRange
in interface Table.CheckAndMutateBuilder
timeRange
- timeRange to checkpublic Table.CheckAndMutateBuilder ifNotExists()
Table.CheckAndMutateBuilder
ifNotExists
in interface Table.CheckAndMutateBuilder
public Table.CheckAndMutateBuilder ifMatches(CompareOperator compareOp, byte[] value)
Table.CheckAndMutateBuilder
ifMatches
in interface Table.CheckAndMutateBuilder
compareOp
- comparison operator to usevalue
- the expected valueprivate void preCheck()
public boolean thenPut(Put put) throws IOException
Table.CheckAndMutateBuilder
thenPut
in interface Table.CheckAndMutateBuilder
put
- data to put if check succeedstrue
if the new put was executed, false
otherwise.IOException
public boolean thenDelete(Delete delete) throws IOException
Table.CheckAndMutateBuilder
thenDelete
in interface Table.CheckAndMutateBuilder
delete
- data to delete if check succeedstrue
if the new delete was executed, false
otherwise.IOException
public boolean thenMutate(RowMutations mutation) throws IOException
Table.CheckAndMutateBuilder
thenMutate
in interface Table.CheckAndMutateBuilder
mutation
- mutations to perform if check succeedsIOException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.