Class BaseWorker<O,T>
- java.lang.Object
-
- com.evolveum.midpoint.ninja.action.worker.BaseWorker<O,T>
-
- Type Parameters:
O
- options classT
- type of objects in the queue
- All Implemented Interfaces:
Runnable
- Direct Known Subclasses:
AbstractWriterConsumerWorker
,ExportAuditProducerWorker
,ImportAuditConsumerWorker
,ImportProducerWorker
,ImportRepositoryConsumerWorker
,ProgressReporterWorker
,SearchProducerWorker
public abstract class BaseWorker<O,T> extends Object implements Runnable
Base worker class that either produces or consumesBaseWorker
object for/from queue.
-
-
Field Summary
Fields Modifier and Type Field Description static int
CONSUMER_POLL_TIMEOUT
protected NinjaContext
context
protected OperationStatus
operation
protected O
options
protected BlockingQueue<T>
queue
-
Constructor Summary
Constructors Constructor Description BaseWorker(NinjaContext context, O options, BlockingQueue<T> queue, OperationStatus operation)
BaseWorker(NinjaContext context, O options, BlockingQueue<T> queue, OperationStatus operation, List<? extends BaseWorker<?,?>> workers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isDone()
protected boolean
isWorkersDone()
void
markDone()
protected boolean
shouldConsumerStop()
-
-
-
Field Detail
-
CONSUMER_POLL_TIMEOUT
public static final int CONSUMER_POLL_TIMEOUT
- See Also:
- Constant Field Values
-
queue
protected BlockingQueue<T> queue
-
context
protected NinjaContext context
-
options
protected O options
-
operation
protected OperationStatus operation
-
-
Constructor Detail
-
BaseWorker
public BaseWorker(NinjaContext context, O options, BlockingQueue<T> queue, OperationStatus operation)
-
BaseWorker
public BaseWorker(NinjaContext context, O options, BlockingQueue<T> queue, OperationStatus operation, List<? extends BaseWorker<?,?>> workers)
-
-