Interface ResumableAsyncHandler.ResumableProcessor
-
- All Known Implementing Classes:
PropertiesBasedResumableProcessor
- Enclosing class:
- ResumableAsyncHandler
public static interface ResumableAsyncHandler.ResumableProcessorAn interface to implement in order to manage the way the incomplete file management are handled.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Map<String,Long>load()Load theMapin memory, contains information about the transferred bytes.voidput(String key, long transferredBytes)Associate a key with the number of bytes successfully transferred.voidremove(String key)Remove the key associate value.voidsave(Map<String,Long> map)Save the currentMapinstance which contains information about the current transfer state.
-
-
-
Method Detail
-
put
void put(String key, long transferredBytes)
Associate a key with the number of bytes successfully transferred.- Parameters:
key- a key. The recommended way is to use an url.transferredBytes- The number of bytes successfully transferred.
-
remove
void remove(String key)
Remove the key associate value.- Parameters:
key- key from which the value will be discarded
-
save
void save(Map<String,Long> map)
Save the currentMapinstance which contains information about the current transfer state. This method *only* invoked when the JVM is shutting down.- Parameters:
map- the current transfer state
-
-