Class AsyncResourcesMonitor


  • public class AsyncResourcesMonitor
    extends java.lang.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 Detail

      • AsyncResourcesMonitor

        public AsyncResourcesMonitor​(ServerConfiguration serverConfiguration)
      • AsyncResourcesMonitor

        public AsyncResourcesMonitor​(ServerConfiguration serverConfiguration,
                                     StorageClientFactory storageClientFactory,
                                     java.util.concurrent.ScheduledExecutorService scheduledExecutorService)
    • Method Detail

      • watchAsyncResourcesForBulk

        public void watchAsyncResourcesForBulk​(java.util.Map<java.lang.String,​AccessRequestContext> asyncResources,
                                               java.lang.String requestId,
                                               java.lang.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)