Package fr.gouv.vitam.worker.core.utils
Class LightweightWorkflowLock
java.lang.Object
fr.gouv.vitam.worker.core.utils.LightweightWorkflowLock
Helper class for checking concurrent non completed (running / paused) workflows.
Provides lightweight lock implementation (at most one process can run in parallel).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlistConcurrentWorkflows
(List<String> workflowIds, String currentProcessId) Returns all concurrent non completed (running / paused) workflows.
-
Constructor Details
-
LightweightWorkflowLock
public LightweightWorkflowLock()Default constructor
-
-
Method Details
-
listConcurrentWorkflows
public List<ProcessDetail> listConcurrentWorkflows(List<String> workflowIds, String currentProcessId) throws VitamClientException Returns all concurrent non completed (running / paused) workflows.- Parameters:
workflowIds
- the workflow Ids to checkcurrentProcessId
- the current process id (filtred from result)- Returns:
- the list of concurrent workflows if any, or an empty list if no concurrent workflow is found.
- Throws:
VitamClientException
-