Package com.alibaba.nacos.sys.file
Class FileWatcher
java.lang.Object
com.alibaba.nacos.sys.file.FileWatcher
file watcher.
- Author:
- liaochuntao
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecutor()If the FileWatcher has its own thread pool, use this thread pool to execute, otherwise use the WatchFileManager thread.abstract booleanWatchEvent context information.abstract voidonChange(FileChangeEvent event) Triggered when a file change occurs.
-
Constructor Details
-
FileWatcher
public FileWatcher()
-
-
Method Details
-
onChange
Triggered when a file change occurs.- Parameters:
event-FileChangeEvent
-
interest
WatchEvent context information.- Parameters:
context-WatchEvent.context()- Returns:
- is this watcher interest context
-
executor
If the FileWatcher has its own thread pool, use this thread pool to execute, otherwise use the WatchFileManager thread.- Returns:
Executor
-