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, wait
checkStatusWorker, initialize, loadWorkerList
public static final int QUEUE_SIZE
public void marshallToDB()
IWorkerManager
marshallToDB
in interface IWorkerManager
public void registerWorker(String familyId, String workerId, String workerInformation) throws WorkerAlreadyExistsException, ProcessingBadRequestException, InvalidParseOperationException
IWorkerManager
registerWorker
in interface IWorkerManager
familyId
- : 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)
IWorkerManager
registerWorker
in interface IWorkerManager
workerBean
- the worker description as a WorkerBean objectpublic void unregisterWorker(String workerFamily, String worker) throws WorkerFamilyNotFoundException
IWorkerManager
unregisterWorker
in interface IWorkerManager
workerFamily
- : family of this workerworker
- : ID of the workerWorkerFamilyNotFoundException
- : when the family is unknownpublic WorkerFamilyManager findWorkerBy(String workerFamily)
IWorkerManager
findWorkerBy
in interface IWorkerManager
workerFamily
- the worker familyCopyright © 2018 Vitam. All rights reserved.