Package com.terracottatech.store.async
Interface AsyncRecordStream<K extends Comparable<K>>
- All Superinterfaces:
AsyncStream<Record<K>>
,AutoCloseable
,BaseStream<Record<K>,
AsyncStream<Record<K>>>
- All Known Subinterfaces:
AsyncMutableRecordStream<K>
Asynchronous equivalent to
RecordStream
.-
Method Summary
Modifier and TypeMethodDescriptiondistinct()
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)
.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
-
explain
An asynchronous equivalent toRecordStream.explain(Consumer)
.- 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 interfaceAsyncStream<K extends Comparable<K>>
- Parameters:
predicate
- the inclusion predicate- Returns:
- the new stream
-
distinct
AsyncRecordStream<K> distinct()Description copied from interface:AsyncStream
An asynchronous equivalent toStream.distinct()
.- 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 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 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 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 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 interfaceAsyncStream<K extends Comparable<K>>
- Parameters:
n
- number of leading elements to skip- Returns:
- the new stream
-
sequential
AsyncRecordStream<K> sequential()- Specified by:
sequential
in interfaceBaseStream<Record<K extends Comparable<K>>,
AsyncStream<Record<K extends Comparable<K>>>>
-
parallel
AsyncRecordStream<K> parallel()- Specified by:
parallel
in interfaceBaseStream<Record<K extends Comparable<K>>,
AsyncStream<Record<K extends Comparable<K>>>>
-
unordered
AsyncRecordStream<K> unordered()- Specified by:
unordered
in interfaceBaseStream<Record<K extends Comparable<K>>,
AsyncStream<Record<K extends Comparable<K>>>>
-
onClose
- Specified by:
onClose
in interfaceBaseStream<Record<K extends Comparable<K>>,
AsyncStream<Record<K extends Comparable<K>>>>
-