Package org.duracloud.sync
Class SyncTool
java.lang.Object
org.duracloud.sync.SyncTool
Starting point for the Sync Tool. The purpose of this tool is to synchronize
all of the files in a given set of local file system directories with a
space in DuraCloud. This means that as files are added, updated, and deleted
locally, the Sync Tool will perform the same activities on the files within
DuraCloud.
When the Sync Tool is started for the first time, it will consider all local
files under the given directories (recursively) and determine if those files
already exist in the DuraCloud space. If not, the files will be added. At
that point, the Sync Tool will monitor for updates on the local file system
directories and make updates as needed.
If the Sync Tool is turned off or exits for some reason, and is started again
pointing to the same work directory it will load its previous state and
look through the local file system for files which have changed since it
performed its last backup, which it will then sync with DuraCloud.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanconfigEquals(SyncToolConfig currConfig, SyncToolConfig prevConfig) Determines if two sets of configuration are "equal enough" to indicate that the content to be reviewed for sync operations has not changed on either the local or remote end, suggesting that a re-start would be permissable.protected booleanDetermines if this run of the sync tool will perform a restart.voidprotected voidsetSyncConfig(SyncToolConfig syncConfig) Sets the configuration of the sync tool.
-
Constructor Details
-
SyncTool
public SyncTool()
-
-
Method Details
-
setSyncConfig
Sets the configuration of the sync tool.- Parameters:
syncConfig- to use for running the Sync Tool
-
restartPossible
protected boolean restartPossible()Determines if this run of the sync tool will perform a restart.- Returns:
- true if restart should occur, false otherwise
-
configEquals
Determines if two sets of configuration are "equal enough" to indicate that the content to be reviewed for sync operations has not changed on either the local or remote end, suggesting that a re-start would be permissable.- Parameters:
currConfig- the current sync configurationprevConfig- the sync configuration of the previous run- Returns:
- true if the configs are "equal enough", false otherwise
-
runSyncTool
public void runSyncTool() -
getPrintableHelp
-