Package org.duracloud.sync.walker
Class DeleteChecker
- java.lang.Object
-
- org.duracloud.sync.walker.DeleteChecker
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedDeleteChecker(SyncEndpoint syncEndpoint, String spaceId, List<File> syncDirs, String prefix)Creates a delete checker
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancheckComplete()voidrun()Checks each item in the list of files stored at the endpoint (relative file paths) against each sync directory to see if there is a matching local file.static DeleteCheckerstart(SyncEndpoint syncEndpoint, String spaceId, List<File> syncDirs, String prefix)voidstop()
-
-
-
Constructor Detail
-
DeleteChecker
protected DeleteChecker(SyncEndpoint syncEndpoint, String spaceId, List<File> syncDirs, String prefix)
Creates a delete checker- Parameters:
syncEndpoint- the endpoint to which files are syncedsyncDirs- the list of local source directories being synced
-
-
Method Detail
-
run
public void run()
Checks each item in the list of files stored at the endpoint (relative file paths) against each sync directory to see if there is a matching local file. If there is no matching file, that means that the file which exists in the endpoint no longer exists in the local source directories (i.e. the source file has been deleted.) Each file of this type is removed from the endpoint. Note that if a prefix is used, all files in the endpoint that do not have the prefix will be removed (as they cannot be consistent with what the content ID will be for files pushed up with the prefix.)
-
checkComplete
public boolean checkComplete()
-
stop
public void stop()
-
start
public static DeleteChecker start(SyncEndpoint syncEndpoint, String spaceId, List<File> syncDirs, String prefix)
-
-