T
- The type of task result item.public final class Timed<T> extends IterableEnvelope<T>
Constructor and Description |
---|
Timed(ExecutorService exc,
Iterable<Scalar<T>> tasks,
long timeout,
TimeUnit unit)
Ctor.
|
Timed(ExecutorService exc,
long timeout,
TimeUnit unit,
Scalar<T>... tasks)
Ctor.
|
Timed(int threads,
Iterable<Scalar<T>> tasks,
long timeout,
TimeUnit unit)
Ctor.
|
Timed(int threads,
long timeout,
TimeUnit unit,
Scalar<T>... tasks)
Ctor.
|
equals, hashCode, iterator, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
forEach, spliterator
@SafeVarargs public Timed(ExecutorService exc, long timeout, TimeUnit unit, Scalar<T>... tasks)
exc
- The executor.timeout
- The maximum time to wait.unit
- The time unit of the timeout argument.tasks
- The tasks to be executed concurrently.public Timed(ExecutorService exc, Iterable<Scalar<T>> tasks, long timeout, TimeUnit unit)
exc
- The executor.tasks
- The tasks to be executed concurrently.timeout
- The maximum time to wait.unit
- The time unit of the timeout argument.@SafeVarargs public Timed(int threads, long timeout, TimeUnit unit, Scalar<T>... tasks)
threads
- The quantity of threads which will be used within the
ExecutorService
.timeout
- The maximum time to wait.unit
- The time unit of the timeout argument.tasks
- The tasks to be executed concurrently.Executors.newFixedThreadPool(int)
public Timed(int threads, Iterable<Scalar<T>> tasks, long timeout, TimeUnit unit)
threads
- The quantity of threads which will be used within the
ExecutorService
.tasks
- The tasks to be executed concurrently.timeout
- The maximum time to wait.unit
- The time unit of the timeout argument.Copyright © 2017–2020 Cactoos. All rights reserved.