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 everyRecord
in the stream.Deletes everyRecord
in 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 theRecord
s in the stream.mutateThen
(UpdateOperation<? super K> transform) Performs an update transformation against theRecord
s 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, toArray
Methods inherited from interface java.util.stream.BaseStream
close, isParallel, iterator, spliterator
-
Method Details
-
mutate
Performs an update transformation against theRecord
s in the stream.This is a terminal operation.
- Parameters:
transform
- the transformation to perform- Returns:
- the asynchronous mutation
-
mutateThen
Performs an update transformation against theRecord
s in the stream.This is an intermediate operation.
- Parameters:
transform
- the transformation to perform- Returns:
- a
Stream
of newTuple
s holding before and afterRecord
instances
-
delete
Deletes everyRecord
in the stream.This is a terminal operation.
- Returns:
- the asynchronous deletion
-
deleteThen
AsyncStream<Record<K>> deleteThen()Deletes everyRecord
in the stream.This is an intermediate operation.
- Returns:
- a
Stream
of the deletedRecord
s
-
explain
Description copied from interface:AsyncRecordStream
An asynchronous equivalent toRecordStream.explain(Consumer)
.- Specified by:
explain
in interfaceAsyncRecordStream<K extends Comparable<K>>
- Parameters:
consumer
- the explain consumer- Returns:
- the new stream
-
filter
Description copied from interface:AsyncStream
An asynchronous equivalent toStream.filter(java.util.function.Predicate)
.- Specified by:
filter
in interfaceAsyncRecordStream<K extends Comparable<K>>
- Specified by:
filter
in interfaceAsyncStream<K extends Comparable<K>>
- Parameters:
predicate
- the inclusion predicate- Returns:
- the new stream
-
distinct
AsyncMutableRecordStream<K> distinct()Description copied from interface:AsyncStream
An asynchronous equivalent toStream.distinct()
.- Specified by:
distinct
in interfaceAsyncRecordStream<K extends Comparable<K>>
- Specified by:
distinct
in interfaceAsyncStream<K extends Comparable<K>>
- Returns:
- the new stream
-
sorted
AsyncRecordStream<K> sorted()Description copied from interface:AsyncStream
An asynchronous equivalent toStream.sorted()
.- Specified by:
sorted
in interfaceAsyncRecordStream<K extends Comparable<K>>
- Specified by:
sorted
in interfaceAsyncStream<K extends Comparable<K>>
- Returns:
- the new stream
-
sorted
Description copied from interface:AsyncStream
An asynchronous equivalent toStream.sorted(java.util.Comparator)
.- Specified by:
sorted
in interfaceAsyncRecordStream<K extends Comparable<K>>
- Specified by:
sorted
in interfaceAsyncStream<K extends Comparable<K>>
- Parameters:
comparator
- comparator used to compare the elements- Returns:
- the new stream
-
peek
Description copied from interface:AsyncStream
An asynchronous equivalent toStream.peek(java.util.function.Consumer)
.- Specified by:
peek
in interfaceAsyncRecordStream<K extends Comparable<K>>
- Specified by:
peek
in 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:AsyncStream
An asynchronous equivalent toStream.limit(long)
.- Specified by:
limit
in interfaceAsyncRecordStream<K extends Comparable<K>>
- Specified by:
limit
in interfaceAsyncStream<K extends Comparable<K>>
- Parameters:
maxSize
- maximum number of elements- Returns:
- the new stream
-
skip
Description copied from interface:AsyncStream
An asynchronous equivalent toStream.skip(long)
.- Specified by:
skip
in interfaceAsyncRecordStream<K extends Comparable<K>>
- Specified by:
skip
in interfaceAsyncStream<K extends Comparable<K>>
- Parameters:
n
- number of leading elements to skip- Returns:
- the new stream
-
sequential
AsyncMutableRecordStream<K> sequential()- Specified by:
sequential
in interfaceAsyncRecordStream<K extends Comparable<K>>
- Specified by:
sequential
in interfaceBaseStream<Record<K extends Comparable<K>>,
AsyncStream<Record<K extends Comparable<K>>>>
-
parallel
AsyncMutableRecordStream<K> parallel()- Specified by:
parallel
in interfaceAsyncRecordStream<K extends Comparable<K>>
- Specified by:
parallel
in interfaceBaseStream<Record<K extends Comparable<K>>,
AsyncStream<Record<K extends Comparable<K>>>>
-
unordered
AsyncMutableRecordStream<K> unordered()- Specified by:
unordered
in interfaceAsyncRecordStream<K extends Comparable<K>>
- Specified by:
unordered
in interfaceBaseStream<Record<K extends Comparable<K>>,
AsyncStream<Record<K extends Comparable<K>>>>
-
onClose
- Specified by:
onClose
in interfaceAsyncRecordStream<K extends Comparable<K>>
- Specified by:
onClose
in interfaceBaseStream<Record<K extends Comparable<K>>,
AsyncStream<Record<K extends Comparable<K>>>>
-