Skip to content
Snippets Groups Projects
Commit a588a145 authored by ribeaudc's avatar ribeaudc
Browse files

fix: - 'pathHandlerInterceptor' not registered as 'ChangeListener'.

SVN: 6057
parent 39e71a6d
No related merge requests found
......@@ -20,6 +20,7 @@ import java.io.File;
import java.util.Timer;
import ch.systemsx.cisd.common.Constants;
import ch.systemsx.cisd.common.highwatermark.HighwaterMarkWatcher;
import ch.systemsx.cisd.common.highwatermark.PathHandlerInterceptor;
import ch.systemsx.cisd.common.utilities.DirectoryScanningTimerTask;
import ch.systemsx.cisd.common.utilities.FileUtilities;
......@@ -134,11 +135,14 @@ public class DataMover
private DataMoverProcess createLocalProcessor()
{
final HighwaterMarkWatcher highwaterMarkWatcher =
new HighwaterMarkWatcher(bufferDirs.getBufferDirHighwaterMark());
final LocalProcessor localProcessor =
new LocalProcessor(parameters, bufferDirs, factory.getImmutableCopier(), factory
.getMover());
.getMover(), highwaterMarkWatcher);
final PathHandlerInterceptor pathHandlerInterceptor =
new PathHandlerInterceptor(localProcessor);
highwaterMarkWatcher.addChangeListener(pathHandlerInterceptor);
final DirectoryScanningTimerTask localProcessingTask =
new DirectoryScanningTimerTask(bufferDirs.getCopyCompleteDir(),
FileUtilities.ACCEPT_ALL_FILTER, pathHandlerInterceptor);
......
......@@ -81,13 +81,14 @@ public class LocalProcessor implements IPathHandler, IRecoverableTimerTaskFactor
private final HighwaterMarkWatcher highwaterMarkWatcher;
LocalProcessor(final Parameters parameters, final LocalBufferDirs bufferDirs,
final IPathImmutableCopier copier, final IPathMover mover)
final IPathImmutableCopier copier, final IPathMover mover,
final HighwaterMarkWatcher highwaterMarkWatcher)
{
this.parameters = parameters;
this.inputDir = bufferDirs.getCopyCompleteDir();
this.outputDir = bufferDirs.getReadyToMoveDir();
this.tempDir = bufferDirs.getTempDir();
highwaterMarkWatcher = new HighwaterMarkWatcher(bufferDirs.getBufferDirHighwaterMark());
this.highwaterMarkWatcher = highwaterMarkWatcher;
this.extraCopyDirOrNull = parameters.tryGetExtraCopyDir();
this.copier = copier;
this.mover = mover;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment