Class CheckAndSetRequest
java.lang.Object
com.palantir.atlasdb.keyvalue.api.CheckAndSetRequest
A request to be supplied to KeyValueService.checkAndSet.
Use
newCell(TableReference, Cell, byte[])
if the Cell is not yet stored,
and singleCell(TableReference, Cell, byte[], byte[])
otherwise.
table()
the TableReference
where the Cell is stored.
cell()
the Cell
to update.
oldValue()
the existing value, or empty() if no value exists.
newValue()
the desired new value.-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract Cell
cell()
static CheckAndSetRequest
newCell
(TableReference table, Cell row, byte[] newValue) abstract byte[]
newValue()
Optional<byte[]>
oldValue()
protected abstract byte[]
static CheckAndSetRequest
singleCell
(TableReference table, Cell cell, byte[] oldValue, byte[] newValue) abstract TableReference
table()
-
Constructor Details
-
CheckAndSetRequest
public CheckAndSetRequest()
-
-
Method Details
-
table
-
cell
-
oldValueNullable
@Nullable protected abstract byte[] oldValueNullable() -
oldValue
-
newValue
public abstract byte[] newValue() -
newCell
-
singleCell
public static CheckAndSetRequest singleCell(TableReference table, Cell cell, byte[] oldValue, byte[] newValue)
-