Class AccessRequestManager
java.lang.Object
fr.gouv.vitam.storage.offers.tape.cas.AccessRequestManager
-
Constructor Summary
ConstructorDescriptionAccessRequestManager
(ObjectReferentialRepository objectReferentialRepository, ArchiveReferentialRepository archiveReferentialRepository, AccessRequestReferentialRepository accessRequestReferentialRepository, ArchiveCacheStorage archiveCacheStorage, BucketTopologyHelper bucketTopologyHelper, QueueRepository readWriteQueue, int maxAccessRequestSize, int accessRequestExpirationDelay, TimeUnit accessRequestExpirationUnit, int accessRequestPurgeDelay, TimeUnit accessRequestPurgeUnit, int accessRequestCleanupTaskIntervalDelay, TimeUnit accessRequestCleanupTaskIntervalUnit) -
Method Summary
Modifier and TypeMethodDescriptioncheckAccessRequestStatuses
(List<String> accessRequestIds, boolean adminCrossTenantAccessRequestAllowed) boolean
checkObjectAvailability
(String containerName, List<String> objectNames) Check immediate availability of objects for access.createAccessRequest
(String containerName, List<String> objectNames) static String
Generates a new random Access Request Id Access Request Id format is {GUID}void
removeAccessRequest
(String accessRequestId, boolean adminCrossTenantAccessRequestAllowed) void
shutdown()
void
void
updateAccessRequestWhenArchiveReady
(String readyArchiveId)
-
Constructor Details
-
AccessRequestManager
public AccessRequestManager(ObjectReferentialRepository objectReferentialRepository, ArchiveReferentialRepository archiveReferentialRepository, AccessRequestReferentialRepository accessRequestReferentialRepository, ArchiveCacheStorage archiveCacheStorage, BucketTopologyHelper bucketTopologyHelper, QueueRepository readWriteQueue, int maxAccessRequestSize, int accessRequestExpirationDelay, TimeUnit accessRequestExpirationUnit, int accessRequestPurgeDelay, TimeUnit accessRequestPurgeUnit, int accessRequestCleanupTaskIntervalDelay, TimeUnit accessRequestCleanupTaskIntervalUnit)
-
-
Method Details
-
startExpirationHandler
public void startExpirationHandler() -
createAccessRequest
public String createAccessRequest(String containerName, List<String> objectNames) throws ContentAddressableStorageException -
checkAccessRequestStatuses
public Map<String,AccessRequestStatus> checkAccessRequestStatuses(List<String> accessRequestIds, boolean adminCrossTenantAccessRequestAllowed) throws ContentAddressableStorageException -
removeAccessRequest
public void removeAccessRequest(String accessRequestId, boolean adminCrossTenantAccessRequestAllowed) throws ContentAddressableStorageException -
checkObjectAvailability
public boolean checkObjectAvailability(String containerName, List<String> objectNames) throws ContentAddressableStorageException Check immediate availability of objects for access. An object is available if it is fully stored on disk. Not found objects are available for immediate access (immediate 404).- Parameters:
containerName
- container nameobjectNames
- list of object names whose immediate availability is to be checked- Returns:
true
if ALL objects are available, otherwisefalse
.- Throws:
ContentAddressableStorageException
- on technical exception
-
updateAccessRequestWhenArchiveReady
public void updateAccessRequestWhenArchiveReady(String readyArchiveId) throws AccessRequestReferentialException -
shutdown
public void shutdown() -
generateAccessRequestId
Generates a new random Access Request Id Access Request Id format is {GUID}- Returns:
- the Access Request Id
-