Package io.debezium.connector.cassandra
Class AbstractDirectoryWatcher
java.lang.Object
io.debezium.connector.cassandra.AbstractDirectoryWatcher
Wrapper class around WatchService to make WatchService re-usable and avoid code repetition
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Pathprivate final Set<WatchEvent.Kind<?>> private static final org.slf4j.Loggerprivate final Durationprivate final WatchService -
Constructor Summary
ConstructorsConstructorDescriptionAbstractDirectoryWatcher(Path directory, Duration pollInterval, Set<WatchEvent.Kind<?>> kinds) AbstractDirectoryWatcher(WatchService watchService, Path directory, Duration pollInterval, Set<WatchEvent.Kind<?>> kinds) -
Method Summary
Modifier and TypeMethodDescription(package private) abstract voidhandleEvent(WatchEvent<?> event, Path path) voidpoll()
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
watchService
-
pollInterval
-
directory
-
kinds
-
-
Constructor Details
-
AbstractDirectoryWatcher
public AbstractDirectoryWatcher(Path directory, Duration pollInterval, Set<WatchEvent.Kind<?>> kinds) throws IOException - Throws:
IOException
-
AbstractDirectoryWatcher
AbstractDirectoryWatcher(WatchService watchService, Path directory, Duration pollInterval, Set<WatchEvent.Kind<?>> kinds) throws IOException - Throws:
IOException
-
-
Method Details
-
poll
- Throws:
InterruptedExceptionIOException
-
handleEvent
- Throws:
IOException
-