Package org.duracloud.sync.walker
Class DeleteChecker
java.lang.Object
org.duracloud.sync.walker.DeleteChecker
- All Implemented Interfaces:
Runnable
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDeleteChecker(SyncEndpoint syncEndpoint, String spaceId, List<File> syncDirs, String prefix) Creates a delete checker -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidrun()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 DeleteCheckervoidstop()
-
Constructor Details
-
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 Details
-
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)
-