Package me.desair.tus.server.upload
Class TimeBasedUploadIdFactory
java.lang.Object
me.desair.tus.server.upload.UploadIdFactory
me.desair.tus.server.upload.TimeBasedUploadIdFactory
Alternative
UploadIdFactory
implementation that uses the current system time to generate
ID's. Since time is not unique, this upload ID factory should not be used in busy, clustered
production systems.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateId()
Create a new unique upload ID.protected Serializable
getIdValueIfValid
(String extractedUrlId) Transform the extracted path ID value to a value to use for the upload ID object.Methods inherited from class me.desair.tus.server.upload.UploadIdFactory
getUploadUri, getUploadUriPattern, readUploadId, setUploadUri
-
Constructor Details
-
TimeBasedUploadIdFactory
public TimeBasedUploadIdFactory()
-
-
Method Details
-
getIdValueIfValid
Description copied from class:UploadIdFactory
Transform the extracted path ID value to a value to use for the upload ID object. If the extracted value is not valid, null is returned- Specified by:
getIdValueIfValid
in classUploadIdFactory
- Parameters:
extractedUrlId
- The ID extracted from the URL- Returns:
- Value to use in the UploadId object, null if the extracted URL value was not valid
-
createId
Description copied from class:UploadIdFactory
Create a new unique upload ID.- Specified by:
createId
in classUploadIdFactory
- Returns:
- A new unique upload ID
-