public class TusURLMemoryStore extends java.lang.Object implements TusURLStore
HashMap
. This functionality is used to allow resuming uploads. The
fingerprint is usually retrieved using TusUpload.getFingerprint()
.
Constructor and Description |
---|
TusURLMemoryStore() |
Modifier and Type | Method and Description |
---|---|
java.net.URL |
get(java.lang.String fingerprint)
Retrieve an upload's URL for a fingerprint.
|
void |
remove(java.lang.String fingerprint)
Remove an entry from the store.
|
void |
set(java.lang.String fingerprint,
java.net.URL url)
Store a new fingerprint and its upload URL.
|
public void set(java.lang.String fingerprint, java.net.URL url)
TusURLStore
set
in interface TusURLStore
fingerprint
- An upload's fingerprint.url
- The corresponding upload URL.public java.net.URL get(java.lang.String fingerprint)
TusURLStore
null
.get
in interface TusURLStore
fingerprint
- An upload's fingerprint.public void remove(java.lang.String fingerprint)
TusURLStore
TusURLStore.get(String)
with the same fingerprint will
return null
. If no entry exists for this fingerprint no exception should be
thrown.remove
in interface TusURLStore
fingerprint
- An upload's fingerprint.