public class FileTreeRepositories
extends java.lang.Object
FileTreeRepository.| Modifier and Type | Method and Description |
|---|---|
static <T> FileTreeRepository<T> |
get(FileTreeDataViews.Converter<T> converter,
boolean followLinks)
Create a file tree repository.
|
static <T> FileTreeRepository<T> |
get(FileTreeDataViews.Converter<T> converter,
boolean followLinks,
boolean rescanOnDirectoryUpdates,
Logger logger)
Create a file tree repository.
|
public static <T> FileTreeRepository<T> get(FileTreeDataViews.Converter<T> converter, boolean followLinks) throws java.lang.InterruptedException, java.io.IOException
T - the value type of the cache entriesconverter - converts a path to the cached value type TfollowLinks - toggles whether or not to follow symbolic links. When true, any symbolic
links that point to a regular file will trigger an event when the target file is modified.
For any symbolic links that point to a directory, the children of the target directory will
be included (up to the max depth parameter specified by FileTreeRepository.register(java.nio.file.Path, int)) and will trigger an event when any of the included children
are modified. When false, symbolic links are not followed and only events for the symbolic
link itself are reported.java.lang.InterruptedException - if the path watcher can't be started.java.io.IOException - if an instance of WatchService cannot be created.public static <T> FileTreeRepository<T> get(FileTreeDataViews.Converter<T> converter, boolean followLinks, boolean rescanOnDirectoryUpdates, Logger logger) throws java.lang.InterruptedException, java.io.IOException
T - the value type of the cache entriesconverter - converts a path to the cached value type TfollowLinks - toggles whether or not to follow symbolic links. When true, any symbolic
links that point to a regular file will trigger an event when the target file is modified.
For any symbolic links that point to a directory, the children of the target directory will
be included (up to the max depth parameter specified by FileTreeRepository.register(java.nio.file.Path, int)) and will trigger an event when any of the included children
are modified. When false, symbolic links are not followed and only events for the symbolic
link itself are reported.rescanOnDirectoryUpdates - toggles whether or not we rescan a directory's subtree when an
update is detected for that directory. This can be very expensive since it will perform
iops proportional to the number of files in the subtree. It generally should not be
necessary since we are also watching the subtree for events.logger - java.lang.InterruptedException - if the path watcher can't be started.java.io.IOException - if an instance of WatchService cannot be created.