public class SynchronizedWorker extends PoolWorkerStrategy
Modifier and Type | Field and Description |
---|---|
protected java.util.concurrent.Semaphore |
sem |
protected IStructure<PTask> |
taskPool |
pleaseWait
abort, executed, threadId
Constructor and Description |
---|
SynchronizedWorker(IStructure<PTask> taskPool,
java.util.concurrent.Semaphore sem) |
Modifier and Type | Method and Description |
---|---|
void |
execute()
This function iterates while the flag abort is false.
|
void |
trigger() |
checkForWait, getTaskPool, pleaseWait, pleaseWakeUp, setTaskPool
getExecutedCounter, getThreadID, shutdown, toString
protected IStructure<PTask> taskPool
protected java.util.concurrent.Semaphore sem
public SynchronizedWorker(IStructure<PTask> taskPool, java.util.concurrent.Semaphore sem)
public void trigger()
trigger
in class PoolWorkerStrategy
public void execute()
execute
in class WorkerStrategy