|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ning.http.client.resumable.PropertiesBasedResumableProcessor
public class PropertiesBasedResumableProcessor
A ResumableAsyncHandler.ResumableProcessor
which use a properties file
to store the download index information.
Constructor Summary | |
---|---|
PropertiesBasedResumableProcessor()
|
Method Summary | |
---|---|
Map<String,Long> |
load()
Load the Map in memory, contains information about the transferred bytes. |
void |
put(String url,
long transferredBytes)
Associate a key with the number of bytes sucessfully transferred. |
void |
remove(String uri)
Remove the key associate value. |
void |
save(Map<String,Long> map)
Save the current Map instance which contains information about the current transfer state. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PropertiesBasedResumableProcessor()
Method Detail |
---|
public void put(String url, long transferredBytes)
put
in interface ResumableAsyncHandler.ResumableProcessor
url
- a key. The recommended way is to use an url.transferredBytes
- The number of bytes sucessfully transferred.public void remove(String uri)
remove
in interface ResumableAsyncHandler.ResumableProcessor
uri
- key from which the value will be discartedpublic void save(Map<String,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.ResumableProcessor
public Map<String,Long> load()
Map
in memory, contains information about the transferred bytes.
load
in interface ResumableAsyncHandler.ResumableProcessor
Map
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |