public class BlockingOverseer extends SimpleOverseer
| Modifier and Type | Field and Description |
|---|---|
private static org.slf4j.Logger |
LOGGER |
private Semaphore |
semaphore |
currentWorkers, observers, taskWorkerMapping, workersSetMutex| Constructor and Description |
|---|
BlockingOverseer(int numberOfConcurrentTasks) |
| Modifier and Type | Method and Description |
|---|---|
void |
reportTaskFinished(Worker worker) |
void |
reportTaskThrowedException(Worker worker,
Throwable t) |
void |
startTask(Task task)
Starts the given
Task. |
createWorker, startWorkeraddObserver, getTaskState, getTaskStates, getWorker, removeObserverprivate static final org.slf4j.Logger LOGGER
private Semaphore semaphore
public void startTask(Task task)
OverseerTask.startTask in interface OverseerstartTask in class AbstractOverseertask - the Task that should be executedpublic void reportTaskFinished(Worker worker)
reportTaskFinished in interface WorkerObserverreportTaskFinished in class AbstractOverseerpublic void reportTaskThrowedException(Worker worker, Throwable t)
reportTaskThrowedException in interface WorkerObserverreportTaskThrowedException in class AbstractOverseerCopyright © 2015–2020. All rights reserved.