Class PooledWorkerResults<T>
- java.lang.Object
-
- com.identityworksllc.iiq.common.threads.PooledWorkerResults<T>
-
- Type Parameters:
T
- The type of the results expected
public class PooledWorkerResults<T> extends Object
A container for holding the results of a whole pool of workers.This makes working with the outputs of pooled actions easier in Beanshell and other similar contexts.
-
-
Constructor Summary
Constructors Constructor Description PooledWorkerResults()
Creates a new pooled worker result container
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addFailure(Failure<T,? extends Exception> f)
Adds a failure to the outputAtomicInteger
getCompleted()
Gets the completion counterAtomicInteger
getFailed()
Gets the failure counterList<Failure<T,? extends Exception>>
getFailures()
Gets the list of any failures associated with this pooled actionboolean
isInterrupted()
void
setInterrupted(boolean interrupted)
Sets this action as interrupted
-
-
-
Constructor Detail
-
PooledWorkerResults
public PooledWorkerResults()
Creates a new pooled worker result container
-
-
Method Detail
-
addFailure
public void addFailure(Failure<T,? extends Exception> f)
Adds a failure to the output- Parameters:
f
- The failure object, containing the thing that failed and the exception
-
getCompleted
public AtomicInteger getCompleted()
Gets the completion counter- Returns:
- The completion counter
-
getFailed
public AtomicInteger getFailed()
Gets the failure counter- Returns:
- The failure counter
-
getFailures
public List<Failure<T,? extends Exception>> getFailures()
Gets the list of any failures associated with this pooled action- Returns:
- The list of failures
-
isInterrupted
public boolean isInterrupted()
-
setInterrupted
public void setInterrupted(boolean interrupted)
Sets this action as interrupted- Parameters:
interrupted
- The interrupted flag
-
-