Class AsyncResourcesMonitor

java.lang.Object
fr.gouv.vitam.processing.distributor.core.AsyncResourcesMonitor

public class AsyncResourcesMonitor extends Object
Global processing service monitoring regularly the status of asynchronous resources from storage engine. This service is used for all workflows who need to read a resource on a tape offer.
  • Constructor Details

  • Method Details

    • watchAsyncResourcesForBulk

      public void watchAsyncResourcesForBulk(Map<String,AccessRequestContext> asyncResources, String requestId, String taskId, WorkflowInterruptionChecker workflowInterruptionChecker, AsyncResourceCallback callback)
      Add all the async resources of a bulk to monitor its statuses until it's either available or its accessRequest needs to be re-created.
      Parameters:
      asyncResources - map of accessRequestIds with it couple strategyId/OfferId for each
      requestId - request id of the workflow waiting for the resources availability
      taskId - distribution task id
      workflowInterruptionChecker - a non-blocking / stateless function that check workflow interruption status.
      callback - callback function called to notify the workflow execution waiting for the resource of its availability (or need to re-create)