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

[SE-47]

change: - Implement the 'high water mark' stuff for incoming -> buffer and NOT for buffer -> buffer.

SVN: 6282
parent 0e3227a4
No related branches found
No related tags found
No related merge requests found
...@@ -77,23 +77,6 @@ public final class DirectoryScanningTimerTask extends TimerTask ...@@ -77,23 +77,6 @@ public final class DirectoryScanningTimerTask extends TimerTask
.asScanningHandler(sourceDirectory, handler), 0); .asScanningHandler(sourceDirectory, handler), 0);
} }
/**
* Creates a <var>DirectoryScanningTimerTask</var>.
*
* @param scannedStore The store which is scan for entries.
* @param sourceDirectory The directory to scan for entries.
* @param storeHandler The handler that is used for treating the matching paths.
* @param ignoredErrorCount The number of consecutive errors of reading the directory that need
* to occur before the next error is logged (can be used to suppress error when the
* directory is on a remote share and the server is flaky sometimes)
*/
public DirectoryScanningTimerTask(final IScannedStore scannedStore, final File sourceDirectory,
final IStoreHandler storeHandler, final int ignoredErrorCount)
{
this(scannedStore, new FaultyPathDirectoryScanningHandler(sourceDirectory), storeHandler,
ignoredErrorCount);
}
/** /**
* Creates a <var>DirectoryScanningTimerTask</var>. * Creates a <var>DirectoryScanningTimerTask</var>.
* *
...@@ -108,24 +91,6 @@ public final class DirectoryScanningTimerTask extends TimerTask ...@@ -108,24 +91,6 @@ public final class DirectoryScanningTimerTask extends TimerTask
this(asScannedStore(sourceDirectory, filter), directoryScanningHandler, storeHandler, 0); this(asScannedStore(sourceDirectory, filter), directoryScanningHandler, storeHandler, 0);
} }
/**
* Creates a <var>DirectoryScanningTimerTask</var>.
*
* @param sourceDirectory The directory to scan for entries.
* @param fileFilter The file filter that picks the entries to handle.
* @param pathHandler The handler that is used for treating the matching paths.
* @param ignoredErrorCount The number of consecutive errors of reading the directory that need
* to occur before the next error is logged (can be used to suppress error when the
* directory is on a remote share and the server is flaky sometimes)
*/
DirectoryScanningTimerTask(final File sourceDirectory, final FileFilter fileFilter,
final IPathHandler pathHandler, final int ignoredErrorCount)
{
this(asScannedStore(sourceDirectory, fileFilter), new FaultyPathDirectoryScanningHandler(
sourceDirectory), PathHandlerAdapter
.asScanningHandler(sourceDirectory, pathHandler), ignoredErrorCount);
}
/** /**
* Creates a <var>DirectoryScanningTimerTask</var>. * Creates a <var>DirectoryScanningTimerTask</var>.
* *
...@@ -133,7 +98,7 @@ public final class DirectoryScanningTimerTask extends TimerTask ...@@ -133,7 +98,7 @@ public final class DirectoryScanningTimerTask extends TimerTask
* @param filter The file filter that picks the entries to handle. * @param filter The file filter that picks the entries to handle.
* @param pathHandler The handler that is used for treating the matching paths. * @param pathHandler The handler that is used for treating the matching paths.
*/ */
DirectoryScanningTimerTask(final File sourceDirectory, final FileFilter filter, public DirectoryScanningTimerTask(final File sourceDirectory, final FileFilter filter,
final IPathHandler pathHandler) final IPathHandler pathHandler)
{ {
this(sourceDirectory, filter, pathHandler, 0); this(sourceDirectory, filter, pathHandler, 0);
...@@ -149,7 +114,7 @@ public final class DirectoryScanningTimerTask extends TimerTask ...@@ -149,7 +114,7 @@ public final class DirectoryScanningTimerTask extends TimerTask
* to occur before the next error is logged (can be used to suppress error when the * to occur before the next error is logged (can be used to suppress error when the
* directory is on a remote share and the server is flaky sometimes) * directory is on a remote share and the server is flaky sometimes)
*/ */
private DirectoryScanningTimerTask(final IScannedStore scannedStore, public DirectoryScanningTimerTask(final IScannedStore scannedStore,
final IDirectoryScanningHandler directoryScanningHandler, final IDirectoryScanningHandler directoryScanningHandler,
final IStoreHandler storeHandler, final int ignoredErrorCount) final IStoreHandler storeHandler, final int ignoredErrorCount)
{ {
...@@ -164,6 +129,24 @@ public final class DirectoryScanningTimerTask extends TimerTask ...@@ -164,6 +129,24 @@ public final class DirectoryScanningTimerTask extends TimerTask
this.directoryScanningHandler = directoryScanningHandler; this.directoryScanningHandler = directoryScanningHandler;
} }
/**
* Creates a <var>DirectoryScanningTimerTask</var>.
*
* @param sourceDirectory The directory to scan for entries.
* @param fileFilter The file filter that picks the entries to handle.
* @param pathHandler The handler that is used for treating the matching paths.
* @param ignoredErrorCount The number of consecutive errors of reading the directory that need
* to occur before the next error is logged (can be used to suppress error when the
* directory is on a remote share and the server is flaky sometimes)
*/
DirectoryScanningTimerTask(final File sourceDirectory, final FileFilter fileFilter,
final IPathHandler pathHandler, final int ignoredErrorCount)
{
this(asScannedStore(sourceDirectory, fileFilter), new FaultyPathDirectoryScanningHandler(
sourceDirectory), PathHandlerAdapter
.asScanningHandler(sourceDirectory, pathHandler), ignoredErrorCount);
}
private final static IScannedStore asScannedStore(final File directory, final FileFilter filter) private final static IScannedStore asScannedStore(final File directory, final FileFilter filter)
{ {
return new DirectoryScannedStore(filter, directory); return new DirectoryScannedStore(filter, directory);
......
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