All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.tus.java.client.TusURLMemoryStore Maven / Gradle / Ivy

There is a newer version: 0.5.0
Show newest version
package io.tus.java.client;

import java.net.URL;
import java.util.HashMap;
import java.util.Map;

/**
 * This class is used to map an upload's fingerprint with the corresponding upload URL by storing
 * the entries in a {@link HashMap}. This functionality is used to allow resuming uploads. The
 * fingerprint is usually retrieved using {@link TusUpload#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. */ public class TusURLMemoryStore implements TusURLStore { private Map store = new HashMap(); @Override public void set(String fingerprint, URL url) { store.put(fingerprint, url); } @Override public URL get(String fingerprint) { return store.get(fingerprint); } @Override public void remove(String fingerprint) { store.remove(fingerprint); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy