Class AccessRequestManager
- java.lang.Object
-
- fr.gouv.vitam.storage.offers.tape.cas.AccessRequestManager
-
public class AccessRequestManager extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description AccessRequestManager(ObjectReferentialRepository objectReferentialRepository, ArchiveReferentialRepository archiveReferentialRepository, AccessRequestReferentialRepository accessRequestReferentialRepository, ArchiveCacheStorage archiveCacheStorage, BucketTopologyHelper bucketTopologyHelper, QueueRepository readWriteQueue, int maxAccessRequestSize, int accessRequestExpirationDelay, java.util.concurrent.TimeUnit accessRequestExpirationUnit, int accessRequestPurgeDelay, java.util.concurrent.TimeUnit accessRequestPurgeUnit, int accessRequestCleanupTaskIntervalDelay, java.util.concurrent.TimeUnit accessRequestCleanupTaskIntervalUnit)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,AccessRequestStatus>
checkAccessRequestStatuses(java.util.List<java.lang.String> accessRequestIds, boolean adminCrossTenantAccessRequestAllowed)
boolean
checkObjectAvailability(java.lang.String containerName, java.util.List<java.lang.String> objectNames)
Check immediate availability of objects for access.java.lang.String
createAccessRequest(java.lang.String containerName, java.util.List<java.lang.String> objectNames)
static java.lang.String
generateAccessRequestId()
Generates a new random Access Request Id Access Request Id format is {GUID}void
removeAccessRequest(java.lang.String accessRequestId, boolean adminCrossTenantAccessRequestAllowed)
void
shutdown()
void
startExpirationHandler()
void
updateAccessRequestWhenArchiveReady(java.lang.String readyArchiveId)
-
-
-
Constructor Detail
-
AccessRequestManager
public AccessRequestManager(ObjectReferentialRepository objectReferentialRepository, ArchiveReferentialRepository archiveReferentialRepository, AccessRequestReferentialRepository accessRequestReferentialRepository, ArchiveCacheStorage archiveCacheStorage, BucketTopologyHelper bucketTopologyHelper, QueueRepository readWriteQueue, int maxAccessRequestSize, int accessRequestExpirationDelay, java.util.concurrent.TimeUnit accessRequestExpirationUnit, int accessRequestPurgeDelay, java.util.concurrent.TimeUnit accessRequestPurgeUnit, int accessRequestCleanupTaskIntervalDelay, java.util.concurrent.TimeUnit accessRequestCleanupTaskIntervalUnit)
-
-
Method Detail
-
startExpirationHandler
public void startExpirationHandler()
-
createAccessRequest
public java.lang.String createAccessRequest(java.lang.String containerName, java.util.List<java.lang.String> objectNames) throws ContentAddressableStorageException
-
checkAccessRequestStatuses
public java.util.Map<java.lang.String,AccessRequestStatus> checkAccessRequestStatuses(java.util.List<java.lang.String> accessRequestIds, boolean adminCrossTenantAccessRequestAllowed) throws ContentAddressableStorageException
-
removeAccessRequest
public void removeAccessRequest(java.lang.String accessRequestId, boolean adminCrossTenantAccessRequestAllowed) throws ContentAddressableStorageException
-
checkObjectAvailability
public boolean checkObjectAvailability(java.lang.String containerName, java.util.List<java.lang.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(java.lang.String readyArchiveId) throws AccessRequestReferentialException
-
shutdown
public void shutdown()
-
generateAccessRequestId
public static java.lang.String generateAccessRequestId()
Generates a new random Access Request Id Access Request Id format is {GUID}- Returns:
- the Access Request Id
-
-