类 FileWatcher
- java.lang.Object
-
- com.alibaba.nacos.sys.file.FileWatcher
-
public abstract class FileWatcher extends java.lang.Objectfile watcher.- 作者:
- liaochuntao
-
-
构造器概要
构造器 构造器 说明 FileWatcher()
-
方法概要
所有方法 实例方法 抽象方法 具体方法 修饰符和类型 方法 说明 java.util.concurrent.Executorexecutor()If the FileWatcher has its own thread pool, use this thread pool to execute, otherwise use the WatchFileManager thread.abstract booleaninterest(java.lang.String context)WatchEvent context information.abstract voidonChange(FileChangeEvent event)Triggered when a file change occurs.
-
-
-
方法详细资料
-
onChange
public abstract void onChange(FileChangeEvent event)
Triggered when a file change occurs.- 参数:
event-FileChangeEvent
-
interest
public abstract boolean interest(java.lang.String context)
WatchEvent context information.- 参数:
context-WatchEvent.context()- 返回:
- is this watcher interest context
-
executor
public java.util.concurrent.Executor executor()
If the FileWatcher has its own thread pool, use this thread pool to execute, otherwise use the WatchFileManager thread.- 返回:
Executor
-
-