Class AsyncResourcesMonitor
- java.lang.Object
-
- fr.gouv.vitam.processing.distributor.core.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 Summary
Constructors Constructor Description AsyncResourcesMonitor(ServerConfiguration serverConfiguration)
AsyncResourcesMonitor(ServerConfiguration serverConfiguration, StorageClientFactory storageClientFactory, java.util.concurrent.ScheduledExecutorService scheduledExecutorService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.
-
-
-
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 eachrequestId
- request id of the workflow waiting for the resources availabilitytaskId
- distribution task idworkflowInterruptionChecker
- 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)
-
-