Class WorkerManager
java.lang.Object
fr.gouv.vitam.processing.distributor.core.WorkerManager
- All Implemented Interfaces:
IWorkerManager
WorkerManager class contains methods to manage workers
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDefault queue size FIXME : why 15 ? Why not configurableFields inherited from interface fr.gouv.vitam.processing.distributor.api.IWorkerManager
WORKER_DB_PATH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckStatusWorker(String serverHost, int serverPort) findWorkerBy(String workerFamily) Find a worker by its familyvoidMarshall to DatabasevoidregisterWorker(WorkerBean workerBean) Register a workervoidregisterWorker(String familyId, String workerId, WorkerBean workerInformation) To register a worker in the processingvoidunregisterWorker(String workerFamily, String worker) To unregister a worker in the processingMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface fr.gouv.vitam.processing.distributor.api.IWorkerManager
initialize, loadWorkerList
-
Field Details
-
QUEUE_SIZE
public static final int QUEUE_SIZEDefault queue size FIXME : why 15 ? Why not configurable- See Also:
-
-
Constructor Details
-
WorkerManager
public WorkerManager()Constructor -
WorkerManager
-
-
Method Details
-
marshallToDB
Description copied from interface:IWorkerManagerMarshall to Database- Specified by:
marshallToDBin interfaceIWorkerManager- Throws:
IOException
-
registerWorker
public void registerWorker(String familyId, String workerId, WorkerBean workerInformation) throws ProcessingBadRequestException, IOException Description copied from interface:IWorkerManagerTo register a worker in the processing- Specified by:
registerWorkerin interfaceIWorkerManager- Parameters:
familyId- : family of this workerworkerId- : ID of the workerworkerInformation- : Worker Json representation- Throws:
ProcessingBadRequestException- if cannot register worker to familyIOException
-
registerWorker
Description copied from interface:IWorkerManagerRegister a worker- Specified by:
registerWorkerin interfaceIWorkerManager- Parameters:
workerBean- the worker description as a WorkerBean object- Throws:
IOException- thrown when IOException occurs while read/save worker backup file
-
unregisterWorker
public void unregisterWorker(String workerFamily, String worker) throws WorkerFamilyNotFoundException, IOException Description copied from interface:IWorkerManagerTo unregister a worker in the processing- Specified by:
unregisterWorkerin interfaceIWorkerManager- Parameters:
workerFamily- : family of this workerworker- : ID of the worker- Throws:
WorkerFamilyNotFoundException- : when the family is unknownIOException- if IOException occurs
-
checkStatusWorker
- Specified by:
checkStatusWorkerin interfaceIWorkerManager
-
findWorkerBy
Description copied from interface:IWorkerManagerFind a worker by its family- Specified by:
findWorkerByin interfaceIWorkerManager- Parameters:
workerFamily- the worker family- Returns:
- a WorkerFamilyManager object
-
getWorkerDbFile
- Specified by:
getWorkerDbFilein interfaceIWorkerManager
-