public class SyncManager extends Object implements ChangeHandler
Constructor and Description |
---|
SyncManager(List<File> watchDirs,
SyncEndpoint endpoint,
int threads,
long frequency)
Creates a SyncManager which, when started, will watch for updates to
the ChangedList and kick off SyncWorkers to handle any changed files.
|
Modifier and Type | Method and Description |
---|---|
void |
beginSync()
Allows the SyncManager to begin watching for updates to the ChangedList
|
void |
endSync()
Stops the sync, no further changed files will be handled after those
which are in progress have completed.
|
List<MonitoredFile> |
getFilesInTransfer() |
protected File |
getWatchDir(File changedFile) |
boolean |
handleChangedFile(ChangedFile changedFile)
Notifies the SyncManager that a file has changed
|
void |
terminateSync() |
public SyncManager(List<File> watchDirs, SyncEndpoint endpoint, int threads, long frequency)
endpoint
- threads
- frequency
- public void beginSync()
public void endSync()
public void terminateSync()
public boolean handleChangedFile(ChangedFile changedFile)
handleChangedFile
in interface ChangeHandler
changedFile
- the changed filepublic List<MonitoredFile> getFilesInTransfer()
Copyright © 2009–2014 DuraSpace. All rights reserved.