public interface AsyncReadWriteRecordAccessor<K extends java.lang.Comparable<K>> extends AsyncReadRecordAccessor<K>
ReadWriteRecordAccessor
.Modifier and Type | Method and Description |
---|---|
default Operation<java.util.Optional<Record<K>>> |
add(Cell<?>... cells)
An asynchronous equivalent to
ReadWriteRecordAccessor.add(Cell...) . |
default <T> Operation<java.util.Optional<T>> |
add(java.util.function.Function<? super Record<K>,T> mapper,
Cell<?>... cells)
An asynchronous equivalent to
ReadWriteRecordAccessor.add(Function, Cell...) . |
default <T> Operation<java.util.Optional<T>> |
add(java.util.function.Function<? super Record<K>,T> mapper,
java.lang.Iterable<Cell<?>> cells)
An asynchronous equivalent to
ReadWriteRecordAccessor.add(Function, Cell...) . |
Operation<java.util.Optional<Record<K>>> |
add(java.lang.Iterable<Cell<?>> cells)
An asynchronous equivalent to
ReadWriteRecordAccessor.add(Cell...) . |
Operation<java.util.Optional<Record<K>>> |
delete()
An asynchronous equivalent to
ReadWriteRecordAccessor.delete() . |
default <T> Operation<java.util.Optional<T>> |
delete(java.util.function.Function<? super Record<K>,T> mapper)
An asynchronous equivalent to
ReadWriteRecordAccessor.delete(Function) . |
AsyncConditionalReadWriteRecordAccessor<K> |
iff(java.util.function.Predicate<? super Record<K>> predicate)
Equivalent to
ReadWriteRecordAccessor.iff(Predicate) , but returns an
AsyncConditionalReadWriteRecordAccessor rather than a ConditionalReadWriteRecordAccessor. |
Operation<java.util.Optional<Tuple<Record<K>,Record<K>>>> |
update(UpdateOperation<? super K> transform)
An asynchronous equivalent to
ReadWriteRecordAccessor.update(UpdateOperation) . |
default <T> Operation<java.util.Optional<T>> |
update(UpdateOperation<? super K> transform,
java.util.function.BiFunction<? super Record<K>,? super Record<K>,T> mapper)
An asynchronous equivalent to
ReadWriteRecordAccessor.update(UpdateOperation, BiFunction) . |
default Operation<java.lang.Void> |
upsert(Cell<?>... cells)
An asynchronous equivalent to
ReadWriteRecordAccessor.upsert(Cell...) . |
Operation<java.lang.Void> |
upsert(java.lang.Iterable<Cell<?>> cells)
An asynchronous equivalent to
ReadWriteRecordAccessor.upsert(Iterable) . |
read
AsyncConditionalReadWriteRecordAccessor<K> iff(java.util.function.Predicate<? super Record<K>> predicate)
ReadWriteRecordAccessor.iff(Predicate)
, but returns an
AsyncConditionalReadWriteRecordAccessor rather than a ConditionalReadWriteRecordAccessor.iff
in interface AsyncReadRecordAccessor<K extends java.lang.Comparable<K>>
predicate
- the predicate to apply to the record held against the key used to
create this AsyncReadWriteRecordAccessor.default Operation<java.lang.Void> upsert(Cell<?>... cells)
ReadWriteRecordAccessor.upsert(Cell...)
.cells
- the cells to ensure are on the recordOperation<java.lang.Void> upsert(java.lang.Iterable<Cell<?>> cells)
ReadWriteRecordAccessor.upsert(Iterable)
.cells
- a non-null
Iterable
supplying the cells to ensure are on the recordjava.lang.NullPointerException
- if cells
is null
default <T> Operation<java.util.Optional<T>> add(java.util.function.Function<? super Record<K>,T> mapper, Cell<?>... cells)
ReadWriteRecordAccessor.add(Function, Cell...)
.T
- the type returned by the function defined in the mapper parameter.mapper
- function to apply to the record held against the key used to create this ReadWriteRecordAccessor,
if such a record existed already.cells
- cells which form the record.default <T> Operation<java.util.Optional<T>> add(java.util.function.Function<? super Record<K>,T> mapper, java.lang.Iterable<Cell<?>> cells)
ReadWriteRecordAccessor.add(Function, Cell...)
.T
- the type returned by the function defined in the mapper parameter.mapper
- function to apply to the record held against the key used to create this ReadWriteRecordAccessor,
if such a record existed already.cells
- a non-null
Iterable
supplying the cells which form the recordjava.lang.NullPointerException
- if cells
is null
default Operation<java.util.Optional<Record<K>>> add(Cell<?>... cells)
ReadWriteRecordAccessor.add(Cell...)
.cells
- cells which form the record.Operation<java.util.Optional<Record<K>>> add(java.lang.Iterable<Cell<?>> cells)
ReadWriteRecordAccessor.add(Cell...)
.cells
- a non-null
Iterable
supplying the cells which form the recordjava.lang.NullPointerException
- if cells
is null
default <T> Operation<java.util.Optional<T>> update(UpdateOperation<? super K> transform, java.util.function.BiFunction<? super Record<K>,? super Record<K>,T> mapper)
ReadWriteRecordAccessor.update(UpdateOperation, BiFunction)
.T
- the type returned by the function defined in the mapper parameter.transform
- the mutating transformation to apply to the recordmapper
- 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.Operation<java.util.Optional<Tuple<Record<K>,Record<K>>>> update(UpdateOperation<? super K> transform)
ReadWriteRecordAccessor.update(UpdateOperation)
.transform
- the mutating transformation to apply to the recorddefault <T> Operation<java.util.Optional<T>> delete(java.util.function.Function<? super Record<K>,T> mapper)
ReadWriteRecordAccessor.delete(Function)
.T
- the type returned by the function defined in the mapper parameter.mapper
- function to apply to the deleted record.Operation<java.util.Optional<Record<K>>> delete()
ReadWriteRecordAccessor.delete()
.