public class WorkerManager extends Object implements IWorkerManager
| Modifier and Type | Field and Description |
|---|---|
static int |
QUEUE_SIZE
Default queue size
|
| Constructor and Description |
|---|
WorkerManager()
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
WorkerFamilyManager |
findWorkerBy(String workerFamily)
Find a worker by its family
|
void |
marshallToDB()
Marshall to Database
|
void |
registerWorker(String familyId,
String workerId,
String workerInformation)
To register a worker in the processing
|
void |
registerWorker(WorkerBean workerBean)
Register a worker
|
void |
unregisterWorker(String workerFamily,
String worker)
To unregister a worker in the processing
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcheckStatusWorker, initialize, loadWorkerListpublic static final int QUEUE_SIZE
public void marshallToDB()
IWorkerManagermarshallToDB in interface IWorkerManagerpublic void registerWorker(String familyId, String workerId, String workerInformation) throws WorkerAlreadyExistsException, ProcessingBadRequestException, InvalidParseOperationException
IWorkerManagerregisterWorker in interface IWorkerManagerfamilyId - : family of this workerworkerId - : ID of the workerworkerInformation - : Worker Json representationWorkerAlreadyExistsException - : when the worker is already registeredProcessingBadRequestException - if cannot register worker to familyInvalidParseOperationException - if worker description is not well-formedpublic void registerWorker(WorkerBean workerBean)
IWorkerManagerregisterWorker in interface IWorkerManagerworkerBean - the worker description as a WorkerBean objectpublic void unregisterWorker(String workerFamily, String worker) throws WorkerFamilyNotFoundException
IWorkerManagerunregisterWorker in interface IWorkerManagerworkerFamily - : family of this workerworker - : ID of the workerWorkerFamilyNotFoundException - : when the family is unknownpublic WorkerFamilyManager findWorkerBy(String workerFamily)
IWorkerManagerfindWorkerBy in interface IWorkerManagerworkerFamily - the worker familyCopyright © 2018 Vitam. All rights reserved.