case class ParCollectionAsyncTaskRunner[A, M[+AA] <: TraversableOnce[AA]](input: M[A], workerCount: Int = ..., optProgress: Option[ProgressConfig] = None, optRetry: Option[RetryConfig] = None, optThrottle: Option[ThrottleConfig] = None) extends AbstractCollectionAsyncTaskRunner[A, M, ParCollectionAsyncTaskRunner[A, M]] with Product with Serializable
A case class for a parallel asynchronous task runner that is configurable with optional progress reporting, throttling and/or failure retry.
- A
the input type
- M
the collection type
- input
the input collection
- optProgress
optional progress reporting settings
- optRetry
optional failure retry settings
- optThrottle
optional throttle settings
- Alphabetic
- By Inheritance
- ParCollectionAsyncTaskRunner
- Serializable
- Serializable
- Product
- Equals
- AbstractCollectionAsyncTaskRunner
- AbstractAsyncConfigBuilder
- AsyncConfig
- OptThrottleConfig
- OptRetryConfig
- OptProgressConfig
- OptThrottleConfigBuilder
- OptRetryConfigBuilder
- OptProgressConfigBuilder
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
ParCollectionAsyncTaskRunner(input: M[A], workerCount: Int = ..., optProgress: Option[ProgressConfig] = None, optRetry: Option[RetryConfig] = None, optThrottle: Option[ThrottleConfig] = None)
- input
the input collection
- optProgress
optional progress reporting settings
- optRetry
optional failure retry settings
- optThrottle
optional throttle settings
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
build(): AsyncConfig
- returns
a config instance with the current settings
- Definition Classes
- AbstractAsyncConfigBuilder → OptThrottleConfigBuilder → OptRetryConfigBuilder → OptProgressConfigBuilder
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
flatMap[B](f: (A) ⇒ Future[TraversableOnce[B]])(implicit cbf: CanBuildFrom[Nothing, B, M[B]], ec: ExecutionContext): Future[M[B]]
- Annotations
- @inline()
-
def
foreach[U](f: (A) ⇒ Future[U])(implicit ec: ExecutionContext): Future[Unit]
- Annotations
- @inline()
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
val
input: M[A]
- Definition Classes
- ParCollectionAsyncTaskRunner → AbstractCollectionAsyncTaskRunner
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
map[B](f: (A) ⇒ Future[B])(implicit cbf: CanBuildFrom[Nothing, B, M[B]], ec: ExecutionContext): Future[M[B]]
- Annotations
- @inline()
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
val
optProgress: Option[ProgressConfig]
- Definition Classes
- ParCollectionAsyncTaskRunner → OptProgressConfig
-
val
optRetry: Option[RetryConfig]
- Definition Classes
- ParCollectionAsyncTaskRunner → OptRetryConfig
-
val
optThrottle: Option[ThrottleConfig]
- Definition Classes
- ParCollectionAsyncTaskRunner → OptThrottleConfig
-
def
optTotal: Option[Int]
The optional total number of operations as set by derived type
The optional total number of operations as set by derived type
- Definition Classes
- AbstractCollectionAsyncTaskRunner → OptProgressConfig → OptProgressConfigBuilder
-
def
progress(r: TaskEventListener)(implicit ec: ExecutionContext): ParCollectionAsyncTaskRunner[A, M]
Set the optional progress reporting function
Set the optional progress reporting function
- returns
a copy of the builder with the new setting
- Definition Classes
- AbstractAsyncConfigBuilder → OptProgressConfigBuilder
-
def
progress(reportInterval: FiniteDuration)(report: (Progress) ⇒ Unit)(implicit executionContext: ExecutionContext, scheduledExecutionContext: ScheduledExecutionContext): ParCollectionAsyncTaskRunner[A, M]
Set the progress reporting function to periodically report progress
Set the progress reporting function to periodically report progress
- reportInterval
the interval to report progress
- report
a function that accepts the number of operations completed and the total number of operations (or 0 if the total is unknown)
- returns
a copy of the builder with the new setting
- Definition Classes
- OptProgressConfigBuilder
-
def
progress(report: (Progress) ⇒ Unit)(implicit ec: ExecutionContext): ParCollectionAsyncTaskRunner[A, M]
Set the progress reporting function
Set the progress reporting function
- report
a function that accepts the number of operations completed and the total number of operations (or 0 if the total is unknown)
- returns
a copy of the builder with the new setting
- Definition Classes
- OptProgressConfigBuilder
-
def
retry(f: (List[Throwable]) ⇒ Future[Boolean])(implicit ec: ExecutionContext): ParCollectionAsyncTaskRunner[A, M]
Set the optional retry function
Set the optional retry function
- f
a function that accepts a list of failures so far for an operation. The function returns TRUE if the operation should be retried.
- returns
a copy of the builder with the new setting
- Definition Classes
- OptRetryConfigBuilder
-
def
retryDecider(r: RetryDecider)(implicit ec: ExecutionContext): ParCollectionAsyncTaskRunner[A, M]
Set the optional retry function
Set the optional retry function
- returns
a copy of the builder with the new setting
- Definition Classes
- AbstractAsyncConfigBuilder → OptRetryConfigBuilder
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
throttle(_throttle: Duration)(implicit scheduledExecutionContext: ScheduledExecutionContext): ParCollectionAsyncTaskRunner[A, M]
Set the optional throttle period
Set the optional throttle period
- _throttle
the throttle period
- Definition Classes
- OptThrottleConfigBuilder
-
def
throttle_ns(_throttle_ns: Long)(implicit sec: ScheduledExecutionContext): ParCollectionAsyncTaskRunner[A, M]
Set the optional throttle setting in nanoseconds
Set the optional throttle setting in nanoseconds
- _throttle_ns
the throttle period in nanoseconds
- returns
a copy of the builder with the new setting
- Definition Classes
- AbstractAsyncConfigBuilder → OptThrottleConfigBuilder
-
def
using(optProgress: Option[ProgressConfig] = optProgress, optRetry: Option[RetryConfig] = optRetry, optThrottle: Option[ThrottleConfig] = optThrottle): ParCollectionAsyncTaskRunner[A, M]
- Definition Classes
- ParCollectionAsyncTaskRunner → AbstractAsyncConfigBuilder
-
def
using(cfg: AsyncConfig): ParCollectionAsyncTaskRunner[A, M]
Copy an existing configuration
Copy an existing configuration
- cfg
configuration to use
- returns
a copy of the builder with all settings copied from cfg
- Definition Classes
- AbstractAsyncConfigBuilder
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
val
workerCount: Int
- Definition Classes
- ParCollectionAsyncTaskRunner → AsyncConfig