public interface UploadLockingService
| Modifier and Type | Method and Description |
|---|---|
void |
cleanupStaleLocks()
Clean up any stale locks that are still present
|
boolean |
isLocked(UploadId id)
Check if the upload with the given ID is currently locked
|
UploadLock |
lockUploadByUri(String requestURI)
If the given URI represents a valid upload, lock that upload for processing
|
void |
setIdFactory(UploadIdFactory idFactory)
Set an instance if IdFactory to be used for creating identities and extracting them from uploadURIs
|
UploadLock lockUploadByUri(String requestURI) throws TusException, IOException
requestURI - The URI that potentially represents an uploadTusException - If the upload is already lockedIOExceptionvoid cleanupStaleLocks()
throws IOException
IOException - When cleaning a stale lock failsboolean isLocked(UploadId id)
id - The ID of the upload to checkvoid setIdFactory(UploadIdFactory idFactory)
idFactory - The UploadIdFactory to use within this locking serviceCopyright © 2023. All rights reserved.