Class CheckResourceAvailability
java.lang.Object
fr.gouv.vitam.worker.core.handler.ActionHandler
fr.gouv.vitam.worker.core.plugin.common.CheckResourceAvailability
- All Implemented Interfaces:
VitamAutoCloseable
,WorkerAction
,AutoCloseable
- Direct Known Subclasses:
DataRectificationCheckResourceAvailability
,ExportCheckResourceAvailability
,PreservationCheckResourceAvailability
Abstract service of resource availability plugins. These plugins should be added at the beginning of any workflow step who contains an action that download or copy from a resource that could be stored on an async offer.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
checkResourcesAvailability
(Map<AccessRequestContext, List<String>> objectIdsByContext, DataCategory type) Check resource synchronous availability in storage and create access requests for unavailable objectsprotected void
checkResourcesAvailabilityByTypes
(Map<DataCategory, Map<AccessRequestContext, List<String>>> objectIdsByContextbyType) Check for multiple types resource synchronous availability in storage and create access requests for unavailable objectsMethods inherited from class fr.gouv.vitam.worker.core.handler.ActionHandler
checkMandatoryParameters, close, updateDetailItemStatus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface fr.gouv.vitam.worker.core.api.WorkerAction
checkMandatoryIOParameter, execute, executeList
-
Constructor Details
-
CheckResourceAvailability
-
-
Method Details
-
checkResourcesAvailabilityByTypes
protected void checkResourcesAvailabilityByTypes(Map<DataCategory, Map<AccessRequestContext, throws StorageServerClientException, ProcessingRetryAsyncExceptionList<String>>> objectIdsByContextbyType) Check for multiple types resource synchronous availability in storage and create access requests for unavailable objects- Parameters:
objectIdsByContextbyType
- object ids by context (strategy/offer) by type- Throws:
StorageServerClientException
- exception from storageProcessingRetryAsyncException
- exception thrown when some resources are unavailable
-
checkResourcesAvailability
protected void checkResourcesAvailability(Map<AccessRequestContext, List<String>> objectIdsByContext, DataCategory type) throws StorageServerClientException, ProcessingRetryAsyncExceptionCheck resource synchronous availability in storage and create access requests for unavailable objects- Parameters:
objectIdsByContext
- object ids by context (strategy/offer)type
- data category type- Throws:
StorageServerClientException
- exception from storageProcessingRetryAsyncException
- exception thrown when some resources are unavailable
-