@Singleton public class DirectoryWatcherService extends Object
This creates a DirectoryWatcher
, i.e. our low-level implementation of Java's WatchService
API.
This watcher is then only started (submitted for execution) upon first request to register a directory.
Constructor and Description |
---|
DirectoryWatcherService()
Deprecated.
Since 5.4.5, Please use
DirectoryWatcherService(MagnoliaConfigurationProperties) instead. |
DirectoryWatcherService(info.magnolia.init.MagnoliaConfigurationProperties properties) |
Modifier and Type | Method and Description |
---|---|
void |
register(Path path,
com.google.common.base.Predicate<Path> filterPredicate,
WatcherCallback callback)
Registers a directory to the
DirectoryWatcher , with given filtering predicate and callback. |
void |
start() |
void |
stop() |
public DirectoryWatcherService(info.magnolia.init.MagnoliaConfigurationProperties properties) throws IOException
IOException
@Deprecated public DirectoryWatcherService() throws IOException
DirectoryWatcherService(MagnoliaConfigurationProperties)
instead.IOException
public void start()
public void register(Path path, com.google.common.base.Predicate<Path> filterPredicate, WatcherCallback callback) throws IOException
DirectoryWatcher
, with given filtering predicate and callback.IOException
public void stop()
Copyright © 2003–2019 Magnolia International Ltd.. All rights reserved.