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 Detail

      • computeNewValue

        ByteSequence computeNewValue​(ByteSequence oldValue)
        Computes the new value for a record based on the record's existing content.
        Parameters:
        oldValue - The record's existing content, or null 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.