Class VitamPoolingClient


  • public class VitamPoolingClient
    extends java.lang.Object
    This class expose wait methods that implements pooling logic
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean wait​(int tenantId, java.lang.String processId)  
      boolean wait​(int tenantId, java.lang.String processId, int nbTry, long timeout, java.util.concurrent.TimeUnit timeUnit)  
      boolean wait​(int tenantId, java.lang.String processId, ProcessState state)  
      boolean wait​(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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 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 processWorkflow
        state - The state wanted
        nbTry - Number of retry
        timeWait - time to sleep
        timeUnit - 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)
                     throws VitamException
        Parameters:
        tenantId -
        processId -
        Returns:
        Throws:
        VitamException