public class WatchFileCenter extends Object
WatchService internally. One file directory
corresponds to one WatchService. It can only monitor up to 32 file directories. When a file change occurs, a
FileChangeEvent will be issued| 构造器和说明 |
|---|
WatchFileCenter() |
| 限定符和类型 | 方法和说明 |
|---|---|
static boolean |
deregisterAllWatcher(String path)
Deregister all
FileWatcher in this directory. |
static boolean |
deregisterWatcher(String path,
FileWatcher watcher)
Deregister
FileWatcher in this directory. |
static boolean |
registerWatcher(String paths,
FileWatcher watcher)
Register
FileWatcher in this directory. |
static void |
shutdown()
close
WatchFileCenter. |
public static boolean registerWatcher(String paths, FileWatcher watcher) throws com.alibaba.nacos.api.exception.NacosException
FileWatcher in this directory.paths - directorywatcher - FileWatchercom.alibaba.nacos.api.exception.NacosException - NacosExceptionpublic static boolean deregisterAllWatcher(String path)
FileWatcher in this directory.path - directorypublic static void shutdown()
WatchFileCenter.public static boolean deregisterWatcher(String path, FileWatcher watcher)
FileWatcher in this directory.path - directorywatcher - FileWatcherCopyright © 2018–2022 Alibaba Group. All rights reserved.