Package com.terracottatech.store.async
Interface AsyncMutableRecordStream<K extends Comparable<K>>
- All Superinterfaces:
AsyncRecordStream<K>,AsyncStream<Record<K>>,AutoCloseable,BaseStream<Record<K>,AsyncStream<Record<K>>>
Asynchronous equivalent to
MutableRecordStream.-
Method Summary
Modifier and TypeMethodDescriptiondelete()Deletes everyRecordin the stream.Deletes everyRecordin the stream.distinct()An asynchronous equivalent toStream.distinct().An asynchronous equivalent toRecordStream.explain(Consumer).An asynchronous equivalent toStream.filter(java.util.function.Predicate).limit(long maxSize) An asynchronous equivalent toStream.limit(long).mutate(UpdateOperation<? super K> transform) Performs an update transformation against theRecords in the stream.mutateThen(UpdateOperation<? super K> transform) Performs an update transformation against theRecords in the stream.parallel()An asynchronous equivalent toStream.peek(java.util.function.Consumer).skip(long n) An asynchronous equivalent toStream.skip(long).sorted()An asynchronous equivalent toStream.sorted().sorted(Comparator<? super Record<K>> comparator) An asynchronous equivalent toStream.sorted(java.util.Comparator).Methods inherited from interface com.terracottatech.store.async.AsyncStream
allMatch, anyMatch, collect, collect, count, findAny, findFirst, flatMap, flatMapToDouble, flatMapToInt, flatMapToLong, forEach, forEachOrdered, map, mapToDouble, mapToInt, mapToLong, max, min, noneMatch, reduce, reduce, reduce, toArray, toArrayMethods inherited from interface java.util.stream.BaseStream
close, isParallel, iterator, spliterator
-
Method Details
-
mutate
Performs an update transformation against theRecords in the stream.This is a terminal operation.
- Parameters:
transform- the transformation to perform- Returns:
- the asynchronous mutation
-
mutateThen
Performs an update transformation against theRecords in the stream.This is an intermediate operation.
- Parameters:
transform- the transformation to perform- Returns:
- a
Streamof newTuples holding before and afterRecordinstances
-
delete
Deletes everyRecordin the stream.This is a terminal operation.
- Returns:
- the asynchronous deletion
-
deleteThen
AsyncStream<Record<K>> deleteThen()Deletes everyRecordin the stream.This is an intermediate operation.
- Returns:
- a
Streamof the deletedRecords
-
explain
Description copied from interface:AsyncRecordStreamAn asynchronous equivalent toRecordStream.explain(Consumer).- Specified by:
explainin interfaceAsyncRecordStream<K extends Comparable<K>>- Parameters:
consumer- the explain consumer- Returns:
- the new stream
-
filter
Description copied from interface:AsyncStreamAn asynchronous equivalent toStream.filter(java.util.function.Predicate).- Specified by:
filterin interfaceAsyncRecordStream<K extends Comparable<K>>- Specified by:
filterin interfaceAsyncStream<K extends Comparable<K>>- Parameters:
predicate- the inclusion predicate- Returns:
- the new stream
-
distinct
AsyncMutableRecordStream<K> distinct()Description copied from interface:AsyncStreamAn asynchronous equivalent toStream.distinct().- Specified by:
distinctin interfaceAsyncRecordStream<K extends Comparable<K>>- Specified by:
distinctin interfaceAsyncStream<K extends Comparable<K>>- Returns:
- the new stream
-
sorted
AsyncRecordStream<K> sorted()Description copied from interface:AsyncStreamAn asynchronous equivalent toStream.sorted().- Specified by:
sortedin interfaceAsyncRecordStream<K extends Comparable<K>>- Specified by:
sortedin interfaceAsyncStream<K extends Comparable<K>>- Returns:
- the new stream
-
sorted
Description copied from interface:AsyncStreamAn asynchronous equivalent toStream.sorted(java.util.Comparator).- Specified by:
sortedin interfaceAsyncRecordStream<K extends Comparable<K>>- Specified by:
sortedin interfaceAsyncStream<K extends Comparable<K>>- Parameters:
comparator- comparator used to compare the elements- Returns:
- the new stream
-
peek
Description copied from interface:AsyncStreamAn asynchronous equivalent toStream.peek(java.util.function.Consumer).- Specified by:
peekin interfaceAsyncRecordStream<K extends Comparable<K>>- Specified by:
peekin interfaceAsyncStream<K extends Comparable<K>>- Parameters:
action- action to perform on the elements as they are consumed- Returns:
- the new stream
-
limit
Description copied from interface:AsyncStreamAn asynchronous equivalent toStream.limit(long).- Specified by:
limitin interfaceAsyncRecordStream<K extends Comparable<K>>- Specified by:
limitin interfaceAsyncStream<K extends Comparable<K>>- Parameters:
maxSize- maximum number of elements- Returns:
- the new stream
-
skip
Description copied from interface:AsyncStreamAn asynchronous equivalent toStream.skip(long).- Specified by:
skipin interfaceAsyncRecordStream<K extends Comparable<K>>- Specified by:
skipin interfaceAsyncStream<K extends Comparable<K>>- Parameters:
n- number of leading elements to skip- Returns:
- the new stream
-
sequential
AsyncMutableRecordStream<K> sequential()- Specified by:
sequentialin interfaceAsyncRecordStream<K extends Comparable<K>>- Specified by:
sequentialin interfaceBaseStream<Record<K extends Comparable<K>>,AsyncStream<Record<K extends Comparable<K>>>>
-
parallel
AsyncMutableRecordStream<K> parallel()- Specified by:
parallelin interfaceAsyncRecordStream<K extends Comparable<K>>- Specified by:
parallelin interfaceBaseStream<Record<K extends Comparable<K>>,AsyncStream<Record<K extends Comparable<K>>>>
-
unordered
AsyncMutableRecordStream<K> unordered()- Specified by:
unorderedin interfaceAsyncRecordStream<K extends Comparable<K>>- Specified by:
unorderedin interfaceBaseStream<Record<K extends Comparable<K>>,AsyncStream<Record<K extends Comparable<K>>>>
-
onClose
- Specified by:
onClosein interfaceAsyncRecordStream<K extends Comparable<K>>- Specified by:
onClosein interfaceBaseStream<Record<K extends Comparable<K>>,AsyncStream<Record<K extends Comparable<K>>>>
-