implicit final class FlatMapWrapper[V] extends AnyVal
Wrappers to flat mapping in parallel an iterator scala.Iterator.
- Alphabetic
- By Inheritance
- FlatMapWrapper
- AnyVal
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new FlatMapWrapper(iterator: Iterator[V])
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
##(): Int
- Definition Classes
- Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
flatMapParallel[U](numThreads: Int, threadFactory: ⇒ ThreadFactory = Executors.defaultThreadFactory())(f: (V) ⇒ GenTraversableOnce[U]): Iterator[U]
Applies a flat map to an iterator, but it can use a thread pool if numThreads is >1, in that case elements are computed in parallel
Applies a flat map to an iterator, but it can use a thread pool if numThreads is >1, in that case elements are computed in parallel
- U
Type of the new values
- numThreads
Number of threads to use for parallel invocations of f(). Can only be set to a value larger than 1 if the operations include IO operations, or if multiple cores are available per executor.
- threadFactory
The thread factory used to create new threads. This can be used to add initialization code to each worker.
- f
Mapping function, providing the new value for the element
- returns
An iterator with mapping function applied to each element.
-
def
flatMapParallel[U](f: (V) ⇒ GenTraversableOnce[U], numThreads: Int, threadFactory: ⇒ ThreadFactory): Iterator[U]
Applies a flat map to an iterator, but it can use a thread pool if numThreads is >1, in that case elements are computed in parallel
Applies a flat map to an iterator, but it can use a thread pool if numThreads is >1, in that case elements are computed in parallel
- U
Type of the new values
- f
Mapping function, providing the new value for the element
- numThreads
Number of threads to use for parallel invocations of f(). Can only be set to a value larger than 1 if the operations include IO operations, or if multiple cores are available per executor.
- threadFactory
The thread factory used to create new threads. This can be used to add initialization code to each worker.
- returns
An iterator with mapping function applied to each element.
-
def
flatMapParallel[U](f: (V) ⇒ GenTraversableOnce[U], numThreads: Int): Iterator[U]
Applies a flat map to an iterator, but it can use a thread pool if numThreads is >1, in that case elements are computed in parallel
Applies a flat map to an iterator, but it can use a thread pool if numThreads is >1, in that case elements are computed in parallel
- U
Type of the new values
- f
Mapping function, providing the new value for the element
- numThreads
Number of threads to use for parallel invocations of f(). Can only be set to a value larger than 1 if the operations include IO operations, or if multiple cores are available per executor.
- returns
An iterator with mapping function applied to each element.
-
def
flatMapParallelUnordered[U](numThreads: Int, threadFactory: ⇒ ThreadFactory = Executors.defaultThreadFactory())(f: (V) ⇒ GenTraversableOnce[U]): Iterator[U]
Applies a flat map to an iterator, but it can use a thread pool if numThreads is >1, in that case elements are computed in parallel.
Applies a flat map to an iterator, but it can use a thread pool if numThreads is >1, in that case elements are computed in parallel. Elements are emitted as soon as they are ready, therefore it is possible that the transformed elements are not in the same order as in the input iterator.
- U
Type of the new values
- numThreads
Number of threads to use for parallel invocations of f(). Can only be set to a value larger than 1 if the operations include IO operations, or if multiple cores are available per executor.
- threadFactory
The thread factory used to create new threads. This can be used to add initialization code to each worker.
- f
Mapping function, providing the new value for the element
- returns
An iterator with mapping function applied to each element.
-
def
flatMapParallelUnordered[U](f: (V) ⇒ GenTraversableOnce[U], numThreads: Int, threadFactory: ⇒ ThreadFactory): Iterator[U]
Applies a flat map to an iterator, but it can use a thread pool if numThreads is >1, in that case elements are computed in parallel.
Applies a flat map to an iterator, but it can use a thread pool if numThreads is >1, in that case elements are computed in parallel. Elements are emitted as soon as they are ready, therefore it is possible that the transformed elements are not in the same order as in the input iterator.
- U
Type of the new values
- f
Mapping function, providing the new value for the element
- numThreads
Number of threads to use for parallel invocations of f(). Can only be set to a value larger than 1 if the operations include IO operations, or if multiple cores are available per executor.
- threadFactory
The thread factory used to create new threads. This can be used to add initialization code to each worker.
- returns
An iterator with mapping function applied to each element.
-
def
flatMapParallelUnordered[U](f: (V) ⇒ GenTraversableOnce[U], numThreads: Int): Iterator[U]
Applies a flat map to an iterator, but it can use a thread pool if numThreads is >1, in that case elements are computed in parallel.
Applies a flat map to an iterator, but it can use a thread pool if numThreads is >1, in that case elements are computed in parallel. Elements are emitted as soon as they are ready, therefore it is possible that the transformed elements are not in the same order as in the input iterator.
- U
Type of the new values
- f
Mapping function, providing the new value for the element
- numThreads
Number of threads to use for parallel invocations of f(). Can only be set to a value larger than 1 if the operations include IO operations, or if multiple cores are available per executor.
- returns
An iterator with mapping function applied to each element.
-
def
getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
toString(): String
- Definition Classes
- Any