Class VitamPoolingClient
- java.lang.Object
-
- fr.gouv.vitam.access.external.client.VitamPoolingClient
-
public class VitamPoolingClient extends java.lang.ObjectThis class expose wait methods that implements pooling logic
-
-
Constructor Summary
Constructors Constructor Description VitamPoolingClient(OperationStatusClient operationStatusClient)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanwait(int tenantId, java.lang.String processId)booleanwait(int tenantId, java.lang.String processId, int nbTry, long timeout, java.util.concurrent.TimeUnit timeUnit)booleanwait(int tenantId, java.lang.String processId, ProcessState state)booleanwait(int tenantId, java.lang.String processId, ProcessState state, int nbTry, long timeWait, java.util.concurrent.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 Detail
-
VitamPoolingClient
public VitamPoolingClient(OperationStatusClient operationStatusClient)
- Parameters:
operationStatusClient- interface that expose getOperationProcessStatus
-
-
Method Detail
-
wait
public boolean wait(int tenantId, java.lang.String processId, ProcessState state, int nbTry, long timeWait, java.util.concurrent.TimeUnit timeUnit) throws VitamExceptionThis 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, java.lang.String processId, int nbTry, long timeout, java.util.concurrent.TimeUnit timeUnit) throws VitamException- Parameters:
tenantId-processId-nbTry-timeout-timeUnit-- Returns:
- Throws:
VitamException
-
wait
public boolean wait(int tenantId, java.lang.String processId, ProcessState state) throws VitamException- Parameters:
tenantId-processId-state-- Returns:
- Throws:
VitamException
-
wait
public boolean wait(int tenantId, java.lang.String processId) throws VitamException- Parameters:
tenantId-processId-- Returns:
- Throws:
VitamException
-
-