Class VitamPoolingClient
java.lang.Object
fr.gouv.vitam.access.external.client.VitamPoolingClient
This class expose wait methods that implements pooling logic
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
boolean
wait
(int tenantId, String processId, ProcessState state) boolean
wait
(int tenantId, String processId, ProcessState state, int nbTry, long timeWait, TimeUnit timeUnit) This is a helper method for checking the status of an operation Loop until : - nbTry is reached - state is completed - state is pause and status ordinal is higher than started
-
Constructor Details
-
VitamPoolingClient
- Parameters:
operationStatusClient
- interface that expose getOperationProcessStatus
-
-
Method Details
-
wait
public boolean wait(int tenantId, String processId, ProcessState state, int nbTry, long timeWait, TimeUnit timeUnit) throws VitamException This is a helper method for checking the status of an operation Loop until : - nbTry is reached - state is completed - state is pause and status ordinal is higher than started- Parameters:
tenantId
-processId
- operationId du processWorkflowstate
- The state wantednbTry
- Number of retrytimeWait
- time to sleeptimeUnit
- timeUnit to apply to timeWait- Returns:
- true if completed false else
- Throws:
VitamException
-
wait
public boolean wait(int tenantId, String processId, int nbTry, long timeout, TimeUnit timeUnit) throws VitamException - Parameters:
tenantId
-processId
-nbTry
-timeout
-timeUnit
-- Returns:
- Throws:
VitamException
-
wait
- Parameters:
tenantId
-processId
-state
-- Returns:
- Throws:
VitamException
-
wait
- Parameters:
tenantId
-processId
-- Returns:
- Throws:
VitamException
-