public class WorkerManager extends Object implements IWorkerManager
| Modifier and Type | Field and Description |
|---|---|
static int |
QUEUE_SIZE
Default queue size
|
WORKER_DB_PATH| Constructor and Description |
|---|
WorkerManager()
Constructor
|
WorkerManager(WorkerClientFactory workerClientFactory) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkStatusWorker(String serverHost,
int serverPort) |
WorkerFamilyManager |
findWorkerBy(String workerFamily)
Find a worker by its family
|
File |
getWorkerDbFile() |
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, waitinitialize, loadWorkerListpublic static final int QUEUE_SIZE
public WorkerManager()
public WorkerManager(WorkerClientFactory workerClientFactory)
public void marshallToDB()
IWorkerManagermarshallToDB in interface IWorkerManagerpublic void registerWorker(String familyId, String workerId, String workerInformation) throws ProcessingBadRequestException
IWorkerManagerregisterWorker in interface IWorkerManagerfamilyId - : family of this workerworkerId - : ID of the workerworkerInformation - : Worker Json representationProcessingBadRequestException - if cannot register worker to familypublic 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 boolean checkStatusWorker(String serverHost, int serverPort)
checkStatusWorker in interface IWorkerManagerpublic WorkerFamilyManager findWorkerBy(String workerFamily)
IWorkerManagerfindWorkerBy in interface IWorkerManagerworkerFamily - the worker familypublic File getWorkerDbFile()
getWorkerDbFile in interface IWorkerManagerCopyright © 2019 Vitam. All rights reserved.