Class ThreadExecutorWorker<T>
- java.lang.Object
-
- com.identityworksllc.iiq.common.threads.SailPointWorker
-
- com.identityworksllc.iiq.common.task.ThreadExecutorWorker<T>
-
- All Implemented Interfaces:
Serializable
,Runnable
public class ThreadExecutorWorker<T> extends SailPointWorker
The worker for handling each input object.The input type is always a list of the given objects, to support batching, but for non-batched situations, the list may be of length 1.
None of the inputs may be null.
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.identityworksllc.iiq.common.threads.SailPointWorker
SailPointWorker.ExceptionHandler
-
-
Field Summary
-
Fields inherited from class com.identityworksllc.iiq.common.threads.SailPointWorker
monitor, MULTI_SERIALIZED_WORKERS_ATTR, outcome
-
-
Constructor Summary
Constructors Constructor Description ThreadExecutorWorker(Iterable<T> objects, PrivateContextObjectConsumer<T> consumer, ThreadedTaskListener<T> taskContext)
Basic constructor, corresponds toThreadWorkerCreator
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
execute(sailpoint.api.SailPointContext threadContext, org.apache.commons.logging.Log logger)
InvokesPrivateContextObjectConsumer.threadExecute(SailPointContext, Map, Object)
for each object in the list.-
Methods inherited from class com.identityworksllc.iiq.common.threads.SailPointWorker
addChild, addDependency, addTaskCallback, checkCancel, getDependencyOutput, getDependentPhase, getExceptionHandler, getMonitor, getParent, getPhase, getWorkerName, isTerminated, isTimedOut, run, runnable, setCompletedCounter, setDependentPhase, setExceptionHandler, setFailedCounter, setMonitor, setParent, setPhase, setTimeout, submitWithListeners, terminate, toCallable, toForkJoinTask, toFutureTask, toRequest, toRequest, toString
-
-
-
-
Constructor Detail
-
ThreadExecutorWorker
public ThreadExecutorWorker(Iterable<T> objects, PrivateContextObjectConsumer<T> consumer, ThreadedTaskListener<T> taskContext)
Basic constructor, corresponds toThreadWorkerCreator
.None of the inputs may be null.
- Parameters:
objects
- The objects to iterate overconsumer
- The consumer of those objects (i.e., who is implementing threadExecute)taskContext
- The task context
-
-
Method Detail
-
execute
public Object execute(sailpoint.api.SailPointContext threadContext, org.apache.commons.logging.Log logger) throws InterruptedException
InvokesPrivateContextObjectConsumer.threadExecute(SailPointContext, Map, Object)
for each object in the list.Also invokes a variety of callbacks via the taskContext.
- Specified by:
execute
in classSailPointWorker
- Parameters:
threadContext
- The thread contextlogger
- The log attached to this Worker- Returns:
- always null
- Throws:
InterruptedException
- if the thread has been interrupted
-
-