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
,java.lang.AutoCloseable
- Direct Known Subclasses:
DataRectificationCheckResourceAvailability
,ExportCheckResourceAvailability
,PreservationCheckResourceAvailability
public abstract class CheckResourceAvailability extends ActionHandler
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 Modifier Constructor Description protected
CheckResourceAvailability(StorageClientFactory storage)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
checkResourcesAvailability(java.util.Map<AccessRequestContext,java.util.List<java.lang.String>> objectIdsByContext, DataCategory type)
Check resource synchronous availability in storage and create access requests for unavailable objectsprotected void
checkResourcesAvailabilityByTypes(java.util.Map<DataCategory,java.util.Map<AccessRequestContext,java.util.List<java.lang.String>>> objectIdsByContextbyType)
Check for multiple types resource synchronous availability in storage and create access requests for unavailable objects-
Methods 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 Detail
-
CheckResourceAvailability
protected CheckResourceAvailability(StorageClientFactory storage)
-
-
Method Detail
-
checkResourcesAvailabilityByTypes
protected void checkResourcesAvailabilityByTypes(java.util.Map<DataCategory,java.util.Map<AccessRequestContext,java.util.List<java.lang.String>>> objectIdsByContextbyType) throws StorageServerClientException, ProcessingRetryAsyncException
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(java.util.Map<AccessRequestContext,java.util.List<java.lang.String>> objectIdsByContext, DataCategory type) throws StorageServerClientException, ProcessingRetryAsyncException
Check 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
-
-