public interface TableOperationFactory
TableAPI.execute.
Each operation created here operates on a single row and matches the
corresponding operation defined in TableAPI. For example, the Operation
generated by the createPut method corresponds to the
put method. The argument pattern for creating the
operation is similar. It differs in the following respects:
execute method.
ReturnRow.Choice is passed instead of
ReturnRow.
abortIfUnsuccessful is passed.
The return values associated with operations similarly match the
descriptions for the corresponding methods described in in TableAPI.
They are, however, retrieved differently: the status, return value, previous
value and version are packaged together in TableOperationResult.
| Modifier and Type | Method and Description |
|---|---|
TableOperation |
createDelete(PrimaryKey key,
ReturnRow.Choice prevReturn,
boolean abortIfUnsuccessful)
Create a Delete operation suitable for use as an argument to the
execute method. |
TableOperation |
createDeleteIfVersion(PrimaryKey key,
Version versionMatch,
ReturnRow.Choice prevReturn,
boolean abortIfUnsuccessful)
Create a Delete operation suitable for use as an argument to the
execute method. |
TableOperation |
createPut(Row row,
ReturnRow.Choice prevReturn,
boolean abortIfUnsuccessful)
Create a Put operation suitable for use as an argument to the
execute method. |
TableOperation |
createPutIfAbsent(Row row,
ReturnRow.Choice prevReturn,
boolean abortIfUnsuccessful)
Create a Put operation suitable for use as an argument to the
execute method. |
TableOperation |
createPutIfPresent(Row row,
ReturnRow.Choice prevReturn,
boolean abortIfUnsuccessful)
Create a Put operation suitable for use as an argument to the
execute method. |
TableOperation |
createPutIfVersion(Row row,
Version versionMatch,
ReturnRow.Choice prevReturn,
boolean abortIfUnsuccessful)
Create a Put operation suitable for use as an argument to the
execute method. |
TableOperation createPut(Row row, ReturnRow.Choice prevReturn, boolean abortIfUnsuccessful)
execute method. The semantics of the returned
operation are identical to that of the put method.
The result of evaluating the operation, or the resulting exception,
after the call to execute is available as an
TableOperationResult.
TableOperation createPutIfAbsent(Row row, ReturnRow.Choice prevReturn, boolean abortIfUnsuccessful)
execute method. The semantics of the returned
operation are identical to that of the
putIfAbsent method.
The result of evaluating the operation, or the resulting exception,
after the call to execute is available as an
TableOperationResult.
abortIfUnsuccessful - is true if this operation should cause the
execute transaction to abort when the operation
fails, where failure is the condition when the put
method returns null.putIfAbsent,
executeTableOperation createPutIfPresent(Row row, ReturnRow.Choice prevReturn, boolean abortIfUnsuccessful)
execute method. The semantics of the returned operation
are identical to that of the putIfPresent
method.
The result of evaluating the operation, or the resulting exception,
after the call to execute is available as an
TableOperationResult.
abortIfUnsuccessful - is true if this operation should cause the
execute transaction to abort when the operation
fails, where failure is the condition when the put
method returns null.putIfPresent,
executeTableOperation createPutIfVersion(Row row, Version versionMatch, ReturnRow.Choice prevReturn, boolean abortIfUnsuccessful)
execute method. The semantics of the returned operation
are identical to that of the putIfVersion
method.
The result of evaluating the operation, or the resulting exception,
after the call to execute is available as an
TableOperationResult.
abortIfUnsuccessful - is true if this operation should cause the
execute transaction to abort when the operation
fails, where failure is the condition when the put
method returns null.putIfVersion,
executeTableOperation createDelete(PrimaryKey key, ReturnRow.Choice prevReturn, boolean abortIfUnsuccessful)
execute method. The semantics of the returned
operation are identical to that of the
delete method.
The result of evaluating the operation, or the resulting exception,
after the call to execute is available as an
TableOperationResult.
TableOperation createDeleteIfVersion(PrimaryKey key, Version versionMatch, ReturnRow.Choice prevReturn, boolean abortIfUnsuccessful)
execute method. The semantics of the returned
operation are identical to that of the
deleteIfVersion method.
The result of evaluating the operation, or the resulting exception,
after the call to execute is available as an
TableOperationResult.
abortIfUnsuccessful - is true if this operation should cause the
execute transaction to abort when the operation
fails, where failure is the condition when the
deleteIfVersion
method returns null.deleteIfVersion,
executeCopyright (c) 2011, 2015 Oracle and/or its affiliates. All rights reserved.