Package io.helidon.config
Class PollingStrategies.FilesystemWatchBuilder
- java.lang.Object
-
- io.helidon.config.PollingStrategies.FilesystemWatchBuilder
-
- All Implemented Interfaces:
Builder<PollingStrategy>
,Supplier<PollingStrategy>
- Enclosing class:
- PollingStrategies
public static final class PollingStrategies.FilesystemWatchBuilder extends Object implements Builder<PollingStrategy>
A builder for a filesystem watch polling strategy.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PollingStrategy
build()
Builds a new polling strategy.PollingStrategies.FilesystemWatchBuilder
executor(ScheduledExecutorService executor)
Sets a customexecutor
used to watch filesystem changes on.PollingStrategy
get()
PollingStrategies.FilesystemWatchBuilder
modifiers(WatchEvent.Modifier... modifiers)
Add modifiers to be used when registering theWatchService
.
-
-
-
Method Detail
-
executor
public PollingStrategies.FilesystemWatchBuilder executor(ScheduledExecutorService executor)
Sets a customexecutor
used to watch filesystem changes on.By default single-threaded executor is used.
- Parameters:
executor
- the custom scheduled executor service- Returns:
- a modified builder instance
-
modifiers
public PollingStrategies.FilesystemWatchBuilder modifiers(WatchEvent.Modifier... modifiers)
Add modifiers to be used when registering theWatchService
. SeePath.register(WatchService, java.nio.file.WatchEvent.Kind[], Modifier...)
Path.register}.- Parameters:
modifiers
- the modifiers to add- Returns:
- a modified builder instance
-
build
public PollingStrategy build()
Builds a new polling strategy.- Specified by:
build
in interfaceBuilder<PollingStrategy>
- Returns:
- the new instance
-
get
public PollingStrategy get()
- Specified by:
get
in interfaceBuilder<PollingStrategy>
- Specified by:
get
in interfaceSupplier<PollingStrategy>
-
-