Interface TableOperationFactory
- 
public interface TableOperationFactoryA factory to create operations that can be batched for execution byTableAPI.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
createPutmethod corresponds to theputmethod. The argument pattern for creating the operation is similar. It differs in the following respects:- 
 The writeOptions argument is not passed, since that argument applies to the
 execution of the entire batch of operations and is passed in to the 
executemethod. - 
 
ReturnRow.Choiceis passed instead ofReturnRow. - 
 An additional argument, 
abortIfUnsuccessfulis 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 inTableOperationResult.- Since:
 - 3.0
 
 - 
 The writeOptions argument is not passed, since that argument applies to the
 execution of the entire batch of operations and is passed in to the 
 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TableOperationcreateDelete(PrimaryKey key, ReturnRow.Choice prevReturn, boolean abortIfUnsuccessful)Create a Delete operation suitable for use as an argument to theexecutemethod.TableOperationcreateDeleteIfVersion(PrimaryKey key, Version versionMatch, ReturnRow.Choice prevReturn, boolean abortIfUnsuccessful)Create a Delete operation suitable for use as an argument to theexecutemethod.TableOperationcreatePut(Row row, ReturnRow.Choice prevReturn, boolean abortIfUnsuccessful)Create a Put operation suitable for use as an argument to theexecutemethod.TableOperationcreatePutIfAbsent(Row row, ReturnRow.Choice prevReturn, boolean abortIfUnsuccessful)Create a Put operation suitable for use as an argument to theexecutemethod.TableOperationcreatePutIfPresent(Row row, ReturnRow.Choice prevReturn, boolean abortIfUnsuccessful)Create a Put operation suitable for use as an argument to theexecutemethod.TableOperationcreatePutIfVersion(Row row, Version versionMatch, ReturnRow.Choice prevReturn, boolean abortIfUnsuccessful)Create a Put operation suitable for use as an argument to theexecutemethod. 
 - 
 
- 
- 
Method Detail
- 
createPut
TableOperation createPut(Row row, ReturnRow.Choice prevReturn, boolean abortIfUnsuccessful)
Create a Put operation suitable for use as an argument to theexecutemethod. The semantics of the returned operation are identical to that of theputmethod.The result of evaluating the operation, or the resulting exception, after the call to
executeis available as anTableOperationResult. 
- 
createPutIfAbsent
TableOperation createPutIfAbsent(Row row, ReturnRow.Choice prevReturn, boolean abortIfUnsuccessful)
Create a Put operation suitable for use as an argument to theexecutemethod. The semantics of the returned operation are identical to that of theputIfAbsentmethod.The result of evaluating the operation, or the resulting exception, after the call to
executeis available as anTableOperationResult.- Parameters:
 abortIfUnsuccessful- is true if this operation should cause theexecutetransaction to abort when the operation fails, where failure is the condition when theputmethod returns null.- Returns:
 - the created Put operation
 - See Also:
 putIfAbsent,execute
 
- 
createPutIfPresent
TableOperation createPutIfPresent(Row row, ReturnRow.Choice prevReturn, boolean abortIfUnsuccessful)
Create a Put operation suitable for use as an argument to theexecutemethod. The semantics of the returned operation are identical to that of theputIfPresentmethod.The result of evaluating the operation, or the resulting exception, after the call to
executeis available as anTableOperationResult.- Parameters:
 abortIfUnsuccessful- is true if this operation should cause theexecutetransaction to abort when the operation fails, where failure is the condition when theputmethod returns null.- Returns:
 - the created Put operation
 - See Also:
 putIfPresent,execute
 
- 
createPutIfVersion
TableOperation createPutIfVersion(Row row, Version versionMatch, ReturnRow.Choice prevReturn, boolean abortIfUnsuccessful)
Create a Put operation suitable for use as an argument to theexecutemethod. The semantics of the returned operation are identical to that of theputIfVersionmethod.The result of evaluating the operation, or the resulting exception, after the call to
executeis available as anTableOperationResult.- Parameters:
 abortIfUnsuccessful- is true if this operation should cause theexecutetransaction to abort when the operation fails, where failure is the condition when theputmethod returns null.- Returns:
 - the created Put operation
 - See Also:
 putIfVersion,execute
 
- 
createDelete
TableOperation createDelete(PrimaryKey key, ReturnRow.Choice prevReturn, boolean abortIfUnsuccessful)
Create a Delete operation suitable for use as an argument to theexecutemethod. The semantics of the returned operation are identical to that of thedeletemethod.The result of evaluating the operation, or the resulting exception, after the call to
executeis available as anTableOperationResult. 
- 
createDeleteIfVersion
TableOperation createDeleteIfVersion(PrimaryKey key, Version versionMatch, ReturnRow.Choice prevReturn, boolean abortIfUnsuccessful)
Create a Delete operation suitable for use as an argument to theexecutemethod. The semantics of the returned operation are identical to that of thedeleteIfVersionmethod.The result of evaluating the operation, or the resulting exception, after the call to
executeis available as anTableOperationResult.- Parameters:
 abortIfUnsuccessful- is true if this operation should cause theexecutetransaction to abort when the operation fails, where failure is the condition when thedeleteIfVersionmethod returns null.- Returns:
 - the created Delete operation
 - See Also:
 deleteIfVersion,execute
 
 - 
 
 -