public class VitamPoolingClient extends Object
Constructor and Description |
---|
VitamPoolingClient(OperationStatusClient operationStatusClient) |
Modifier and Type | Method and Description |
---|---|
boolean |
wait(int tenantId,
String processId) |
boolean |
wait(int tenantId,
String processId,
int nbTry,
long timeout,
TimeUnit timeUnit) |
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
|
public VitamPoolingClient(OperationStatusClient operationStatusClient)
operationStatusClient
- interface that expose getOperationProcessStatuspublic boolean wait(int tenantId, String processId, ProcessState state, int nbTry, long timeWait, TimeUnit timeUnit) throws VitamException
tenantId
- processId
- operationId du processWorkflowstate
- The state wantednbTry
- Number of retrytimeWait
- time to sleeptimeUnit
- timeUnit to apply to timeWaitVitamException
public boolean wait(int tenantId, String processId, int nbTry, long timeout, TimeUnit timeUnit) throws VitamException
tenantId
- processId
- nbTry
- timeout
- timeUnit
- VitamException
public boolean wait(int tenantId, String processId, ProcessState state) throws VitamException
tenantId
- processId
- state
- VitamException
public boolean wait(int tenantId, String processId) throws VitamException
tenantId
- processId
- VitamException
Copyright © 2018 Vitam. All rights reserved.