Package org.jgroups.util
Class FileWatcher
- java.lang.Object
-
- org.jgroups.util.FileWatcher
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,java.lang.Runnable
public class FileWatcher extends java.lang.Object implements java.lang.Runnable, java.lang.AutoCloseable
-
-
Field Summary
Fields Modifier and Type Field Description static int
SLEEP
-
Constructor Summary
Constructors Constructor Description FileWatcher()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
run()
void
stop()
void
unwatch(java.nio.file.Path path)
void
watch(java.nio.file.Path path, java.util.function.Consumer<java.nio.file.Path> callback)
-
-
-
Field Detail
-
SLEEP
public static final int SLEEP
- See Also:
- Constant Field Values
-
-
Method Detail
-
unwatch
public void unwatch(java.nio.file.Path path)
-
watch
public void watch(java.nio.file.Path path, java.util.function.Consumer<java.nio.file.Path> callback)
-
run
public void run()
- Specified by:
run
in interfacejava.lang.Runnable
-
stop
public void stop()
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
-
-