Interface UpdateFunction
-
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface UpdateFunction
Function that computes the new value of a record for a Read-Modify-Write operation inside a transaction.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ByteString
computeNewValue(ByteString oldValue)
Computes the new value for a record based on the record's existing content.
-
-
-
Method Detail
-
computeNewValue
ByteString computeNewValue(ByteString oldValue)
Computes the new value for a record based on the record's existing content.- Parameters:
oldValue
- The record's existing content, ornull
if the record does not exist at the moment and is about to be created.- Returns:
- The new value for the record (which may be
null
if the record should be removed), or the old value if no update is required.
-
-