Interface OperationFactory
KVStore.execute.
 
 Each operation created here operates on a single key and matches the
 corresponding operation defined in KVStore. 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:
 
- 
 The durability argument is not passed, since that argument applies to the
 execution of the entire batch of operations and is passed in to the executemethod.
- 
 ReturnValueVersion.Choiceis passed instead ofReturnValueVersion.
- 
 An additional argument, abortIfUnsuccessfulis passed.
 The return values associated with operations similarly match the
 descriptions for the corresponding methods described in in KVStore.
 They are, however, retrieved differently: the status, return value, previous
 value and version are packaged together in OperationResult.
 
- 
Method SummaryModifier and TypeMethodDescriptioncreateDelete(Key key) Create a Delete operation suitable for use as an argument to theexecutemethod.createDelete(Key key, ReturnValueVersion.Choice prevReturn, boolean abortIfUnsuccessful) Create a Delete operation suitable for use as an argument to theexecutemethod.createDeleteIfVersion(Key key, Version version) Create a Delete operation suitable for use as an argument to theexecutemethod.createDeleteIfVersion(Key key, Version version, ReturnValueVersion.Choice prevReturn, boolean abortIfUnsuccessful) Create a Delete operation suitable for use as an argument to theexecutemethod.Create a Put operation suitable for use as an argument to theexecutemethod.createPut(Key key, Value value, ReturnValueVersion.Choice prevReturn, boolean abortIfUnsuccessful) Create a Put operation suitable for use as an argument to theexecutemethod.createPutIfAbsent(Key key, Value value) Create a Put operation suitable for use as an argument to theexecutemethod.createPutIfAbsent(Key key, Value value, ReturnValueVersion.Choice prevReturn, boolean abortIfUnsuccessful) Create a Put operation suitable for use as an argument to theexecutemethod.createPutIfPresent(Key key, Value value) Create a Put operation suitable for use as an argument to theexecutemethod.createPutIfPresent(Key key, Value value, ReturnValueVersion.Choice prevReturn, boolean abortIfUnsuccessful) Create a Put operation suitable for use as an argument to theexecutemethod.createPutIfVersion(Key key, Value value, Version version) Create a Put operation suitable for use as an argument to theexecutemethod.createPutIfVersion(Key key, Value value, Version version, ReturnValueVersion.Choice prevReturn, boolean abortIfUnsuccessful) Create a Put operation suitable for use as an argument to theexecutemethod.
- 
Method Details- 
createPutCreate a Put operation suitable for use as an argument to theexecutemethod. The semantics of the returned operation are identical to that of theputmethod.The previous value is not returned by this method and the abortIfUnsuccessfulproperty is false.The result of evaluating the operation, or the resulting exception, after the call to executeis available as anOperationResult.
- 
createPutOperation createPut(Key key, Value value, ReturnValueVersion.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 anOperationResult.
- 
createPutIfAbsentCreate a Put operation suitable for use as an argument to theexecutemethod. The semantics of the returned operation are identical to that of theputIfAbsentmethod.The previous value is not returned by this method and the abortIfUnsuccessfulproperty is false.The result of evaluating the operation, or the resulting exception, after the call to executeis available as anOperationResult.- Returns:
- the created Put operation
- See Also:
 
- 
createPutIfAbsentOperation createPutIfAbsent(Key key, Value value, ReturnValueVersion.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 anOperationResult.- Parameters:
- abortIfUnsuccessful- is true if this operation should cause the- executetransaction to abort when the operation fails, where failure is the condition when the- putIfAbsentmethod returns null.
- Returns:
- the created Put operation
- See Also:
 
- 
createPutIfPresentCreate a Put operation suitable for use as an argument to theexecutemethod. The semantics of the returned operation are identical to that of theputIfPresentmethod.The previous value is not returned by this method and the abortIfUnsuccessfulproperty is false.The result of evaluating the operation, or the resulting exception, after the call to executeis available as anOperationResult.- Returns:
- the created Put operation
- See Also:
 
- 
createPutIfPresentOperation createPutIfPresent(Key key, Value value, ReturnValueVersion.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 anOperationResult.- Parameters:
- abortIfUnsuccessful- is true if this operation should cause the- executetransaction to abort when the operation fails, where failure is the condition when the- putIfPresentmethod returns null.
- Returns:
- the created Put operation
- See Also:
 
- 
createPutIfVersionCreate a Put operation suitable for use as an argument to theexecutemethod. The semantics of the returned operation are identical to that of theputIfVersionmethod.The previous value is not returned by this method and the abortIfUnsuccessfulproperty is false.The result of evaluating the operation, or the resulting exception, after the call to executeis available as anOperationResult.- Returns:
- the created Put operation
- See Also:
 
- 
createPutIfVersionOperation createPutIfVersion(Key key, Value value, Version version, ReturnValueVersion.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 anOperationResult.- Parameters:
- abortIfUnsuccessful- is true if this operation should cause the- executetransaction to abort when the operation fails, where failure is the condition when the- putIfVersionmethod returns null.
- Returns:
- the created Put operation
- See Also:
 
- 
createDeleteCreate a Delete operation suitable for use as an argument to theexecutemethod. The semantics of the returned operation when executed are identical to that of thedeletemethod.The previous value is not returned by this method and the abortIfUnsuccessfulproperty is false.The result of evaluating the operation, or the resulting exception, after the call to executeis available as anOperationResult.
- 
createDeleteCreate a Delete operation suitable for use as an argument to theexecutemethod. The semantics of the returned operation when executed are identical to that of thedeletemethod.The result of evaluating the operation, or the resulting exception, after the call to executeis available as anOperationResult.
- 
createDeleteIfVersionCreate a Delete operation suitable for use as an argument to theexecutemethod. The semantics of the returned operation when executed are identical to that of thedeleteIfVersionmethod.The previous value is not returned by this method and the abortIfUnsuccessfulproperty is false.The result of evaluating the operation, or the resulting exception, after the call to executeis available as anOperationResult.- Returns:
- the created Delete operation
- See Also:
 
- 
createDeleteIfVersionOperation createDeleteIfVersion(Key key, Version version, ReturnValueVersion.Choice prevReturn, boolean abortIfUnsuccessful) Create a Delete operation suitable for use as an argument to theexecutemethod. The semantics of the returned operation when executed are identical to that of thedeleteIfVersionmethod.The result of evaluating the operation, or the resulting exception, after the call to executeis available as anOperationResult.- Parameters:
- abortIfUnsuccessful- is true if this operation should cause the- executetransaction to abort when the operation fails, where failure is the condition when the- deleteIfVersionmethod returns false.
- Returns:
- the created Delete operation
- See Also:
 
 
-