public class PropertiesBasedResumableProcessor extends java.lang.Object implements ResumableAsyncHandler.ResumableProcessor
ResumableAsyncHandler.ResumableProcessor which use a properties file
to store the download index information.| Constructor and Description |
|---|
PropertiesBasedResumableProcessor() |
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<java.lang.String,java.lang.Long> |
load()
Load the
Map in memory, contains information about the transferred bytes. |
void |
put(java.lang.String url,
long transferredBytes)
Associate a key with the number of bytes successfully transferred.
|
void |
remove(java.lang.String uri)
Remove the key associate value.
|
void |
save(java.util.Map<java.lang.String,java.lang.Long> map)
Save the current
Map instance which contains information about the current transfer state. |
public void put(java.lang.String url,
long transferredBytes)
put in interface ResumableAsyncHandler.ResumableProcessorurl - a key. The recommended way is to use an url.transferredBytes - The number of bytes successfully transferred.public void remove(java.lang.String uri)
remove in interface ResumableAsyncHandler.ResumableProcessoruri - key from which the value will be discardedpublic void save(java.util.Map<java.lang.String,java.lang.Long> map)
Map instance which contains information about the current transfer state.
This method *only* invoked when the JVM is shutting down.save in interface ResumableAsyncHandler.ResumableProcessormap - the current transfer statepublic java.util.Map<java.lang.String,java.lang.Long> load()
Map in memory, contains information about the transferred bytes.load in interface ResumableAsyncHandler.ResumableProcessorMap current transfer stateCopyright © 2018. All Rights Reserved.