Package io.tus.java.client
Class TusURLMemoryStore
- java.lang.Object
-
- io.tus.java.client.TusURLMemoryStore
-
- All Implemented Interfaces:
TusURLStore
public class TusURLMemoryStore extends java.lang.Object implements TusURLStore
This class is used to map an upload's fingerprint with the corresponding upload URL by storing the entries in aHashMap
. This functionality is used to allow resuming uploads. The fingerprint is usually retrieved usingTusUpload.getFingerprint()
.
The values will only be stored as long as the application is running. This store will not keep the values after your application crashes or restarts.
-
-
Constructor Summary
Constructors Constructor Description TusURLMemoryStore()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.net.URL
get(java.lang.String fingerprint)
Returns the corresponding Upload URL to a given fingerprint.void
remove(java.lang.String fingerprint)
Removes the corresponding entry to a fingerprint from theTusURLMemoryStore
.void
set(java.lang.String fingerprint, java.net.URL url)
Stores the upload's fingerprint and url.
-
-
-
Method Detail
-
set
public void set(java.lang.String fingerprint, java.net.URL url)
Stores the upload's fingerprint and url.- Specified by:
set
in interfaceTusURLStore
- Parameters:
fingerprint
- An upload's fingerprint.url
- The corresponding upload URL.
-
get
public java.net.URL get(java.lang.String fingerprint)
Returns the corresponding Upload URL to a given fingerprint.- Specified by:
get
in interfaceTusURLStore
- Parameters:
fingerprint
- An upload's fingerprint.- Returns:
- The corresponding upload URL.
-
remove
public void remove(java.lang.String fingerprint)
Removes the corresponding entry to a fingerprint from theTusURLMemoryStore
.- Specified by:
remove
in interfaceTusURLStore
- Parameters:
fingerprint
- An upload's fingerprint.
-
-