java.lang.Object
io.helidon.config.FileSystemWatcher.Builder
- All Implemented Interfaces:
Builder<FileSystemWatcher.Builder,
,FileSystemWatcher> Supplier<FileSystemWatcher>
- Enclosing class:
- FileSystemWatcher
public static final class FileSystemWatcher.Builder
extends Object
implements Builder<FileSystemWatcher.Builder,FileSystemWatcher>
Fluent API builder for
FileSystemWatcher
.-
Method Summary
Modifier and TypeMethodDescriptionaddWatchServiceModifier
(WatchEvent.Modifier modifier) Add a modifier of the watch service.build()
Build the instance from this builder.Update this builder from meta configuration.executor
(ScheduledExecutorService executor) Executor to use for this watcher.Configure schedule of the file watcher.watchServiceModifiers
(List<WatchEvent.Modifier> modifiers) Set modifiers to use for the watch service.
-
Method Details
-
build
Description copied from interface:Builder
Build the instance from this builder.- Specified by:
build
in interfaceBuilder<FileSystemWatcher.Builder,
FileSystemWatcher> - Returns:
- instance of the built type
-
config
Update this builder from meta configuration.Currently these options are supported:
initial-delay-millis
- delay between the time this watcher is started and the time the first check is triggereddelay-millis
- how often do we check the watcher service for changes
- Parameters:
metaConfig
- configuration of file system watcher- Returns:
- updated builder instance
-
executor
Executor to use for this watcher. The task is scheduled for regular execution and is only blocking a thread for the time needed to process changed files.- Parameters:
executor
- executor service to use- Returns:
- updated builder instance
-
schedule
Configure schedule of the file watcher.- Parameters:
initialDelay
- initial delay before regular scheduling startsdelay
- delay between schedulestimeUnit
- time unit of the delays- Returns:
- updated builer instance
-
addWatchServiceModifier
Add a modifier of the watch service. Currently only implementation specific modifier are available, such ascom.sun.nio.file.SensitivityWatchEventModifier
.- Parameters:
modifier
- modifier to use- Returns:
- updated builder instance
-
watchServiceModifiers
Set modifiers to use for the watch service. Currently only implementation specific modifier are available, such ascom.sun.nio.file.SensitivityWatchEventModifier
.- Parameters:
modifiers
- modifiers to use (replacing current configuration)- Returns:
- updated builder instance
-