Search in sources :

Example 1 with FileTriggerTracker

use of org.jumpmind.symmetric.file.FileTriggerTracker in project symmetric-ds by JumpMind.

the class FileSyncService method trackChanges.

protected void trackChanges(ProcessInfo processInfo, boolean useCrc) {
    List<FileTriggerRouter> fileTriggerRouters = getFileTriggerRoutersForCurrentNode();
    for (FileTriggerRouter fileTriggerRouter : fileTriggerRouters) {
        if (fileTriggerRouter.isEnabled()) {
            try {
                FileTriggerTracker tracker = new FileTriggerTracker(fileTriggerRouter, getDirectorySnapshot(fileTriggerRouter), processInfo, useCrc, engine);
                DirectorySnapshot dirSnapshot = tracker.trackChanges();
                saveDirectorySnapshot(fileTriggerRouter, dirSnapshot);
            } catch (Exception ex) {
                log.error("Failed to track changes for file trigger router: " + fileTriggerRouter.getFileTrigger().getTriggerId() + "::" + fileTriggerRouter.getRouter().getRouterId(), ex);
            }
        }
    }
}
Also used : FileTriggerRouter(org.jumpmind.symmetric.model.FileTriggerRouter) FileTriggerTracker(org.jumpmind.symmetric.file.FileTriggerTracker) FileConflictException(org.jumpmind.symmetric.file.FileConflictException) NoContentException(org.jumpmind.symmetric.transport.NoContentException) SymmetricException(org.jumpmind.symmetric.SymmetricException) IoException(org.jumpmind.exception.IoException) IOException(java.io.IOException) DirectorySnapshot(org.jumpmind.symmetric.file.DirectorySnapshot)

Aggregations

IOException (java.io.IOException)1 IoException (org.jumpmind.exception.IoException)1 SymmetricException (org.jumpmind.symmetric.SymmetricException)1 DirectorySnapshot (org.jumpmind.symmetric.file.DirectorySnapshot)1 FileConflictException (org.jumpmind.symmetric.file.FileConflictException)1 FileTriggerTracker (org.jumpmind.symmetric.file.FileTriggerTracker)1 FileTriggerRouter (org.jumpmind.symmetric.model.FileTriggerRouter)1 NoContentException (org.jumpmind.symmetric.transport.NoContentException)1