Interface AsyncConditionalReadWriteRecordAccessor<K extends Comparable<K>>

All Superinterfaces:
AsyncConditionalReadRecordAccessor<K>

public interface AsyncConditionalReadWriteRecordAccessor<K extends Comparable<K>> extends AsyncConditionalReadRecordAccessor<K>
An asynchronous equivalent to ConditionalReadWriteRecordAccessor.
  • Method Details

    • update

      default <T> Operation<Optional<T>> update(UpdateOperation<? super K> transform, BiFunction<? super Record<K>,? super Record<K>,T> bimapper)
      An asynchronous equivalent to ConditionalReadWriteRecordAccessor.update(UpdateOperation, BiFunction).

      An exception thrown from bimapper is propagated to the caller of the update method. The status of the update operation is unaffected by the failure of bimapper.

      Type Parameters:
      T - the type returned by the function defined in the bimapper parameter.
      Parameters:
      transform - the mutating transformation to apply to the record
      bimapper - the function to apply to the combination of the record that existed before the update and the record that resulted from the update. The first argument to the apply() method will be the record that existed before the update and the second argument will be the record that resulted from the update.
      Returns:
      an Operation representing the update.
    • update

      Operation<Optional<Tuple<Record<K>,Record<K>>>> update(UpdateOperation<? super K> transform)
      Parameters:
      transform - the mutating transformation to apply to the record
      Returns:
      an Operation representing the update.
    • delete

      default <T> Operation<Optional<T>> delete(Function<? super Record<K>,T> mapper)
      An asynchronous equivalent to ConditionalReadWriteRecordAccessor.delete(Function).

      An exception thrown from mapper is propagated to the caller of the delete method. The status of the delete operation is unaffected by the failure of mapper.

      Type Parameters:
      T - the type returned by the function defined in the mapper parameter.
      Parameters:
      mapper - the function to apply to the deleted record.
      Returns:
      an Operation representing the delete.
    • delete

      Operation<Optional<Record<K>>> delete()
      An asynchronous equivalent to ConditionalReadWriteRecordAccessor.delete().
      Returns:
      an Operation representing the delete.