public interface IWorkerManager
| Modifier and Type | Field and Description |
|---|---|
static VitamLogger |
LOGGER
VitamLogger
|
static File |
WORKKER_DB_FILE
Database file
|
static String |
WORKKER_DB_PATH
Path to database
|
| Modifier and Type | Method and Description |
|---|---|
default boolean |
checkStatusWorker(String serverHost,
int serverPort)
Check status
|
WorkerFamilyManager |
findWorkerBy(String workerFamily)
Find a worker by its family
|
default void |
initialize()
Do the initialization Load worker from worker.db
|
default void |
loadWorkerList(File registerWorkerFile)
To load a registered worker list
|
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 familyId,
String workerId)
To unregister a worker in the processing
|
static final VitamLogger LOGGER
static final String WORKKER_DB_PATH
static final File WORKKER_DB_FILE
default void initialize()
default void loadWorkerList(File registerWorkerFile)
registerWorkerFile - the register worker filedefault boolean checkStatusWorker(String serverHost, int serverPort)
serverHost - the server hostserverPort - the server postvoid registerWorker(String familyId, String workerId, String workerInformation) throws WorkerAlreadyExistsException, ProcessingBadRequestException, InvalidParseOperationException
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-formedvoid registerWorker(WorkerBean workerBean) throws WorkerAlreadyExistsException
workerBean - the worker description as a WorkerBean objectWorkerAlreadyExistsException - thrown if the worker already existsvoid unregisterWorker(String familyId, String workerId) throws WorkerFamilyNotFoundException, WorkerNotFoundException, InterruptedException
familyId - : family of this workerworkerId - : ID of the workerWorkerFamilyNotFoundException - : when the family is unknownWorkerNotFoundException - : when the ID of the worker is unknown in the familyInterruptedException - if error in stopping threadvoid marshallToDB()
WorkerFamilyManager findWorkerBy(String workerFamily)
workerFamily - the worker familyCopyright © 2018 Vitam. All rights reserved.