public final class PollingStrategies
extends java.lang.Object
PollingStrategy
implementations.
The static factory methods offer convenient ways to obtain commonly-used
PollingStrategy
implementations.
Modifier and Type | Class | Description |
---|---|---|
static class |
PollingStrategies.FilesystemWatchBuilder |
A builder for a filesystem watch polling strategy.
|
static class |
PollingStrategies.ScheduledBuilder |
A builder for a scheduled polling strategy.
|
Modifier and Type | Method | Description |
---|---|---|
static PollingStrategy |
nop() |
Provides a default polling strategy that does not fire an event at all.
|
static PollingStrategies.ScheduledBuilder |
regular(java.time.Duration interval) |
Provides a scheduled polling strategy with a specified constant interval.
|
static PollingStrategies.FilesystemWatchBuilder |
watch(java.nio.file.Path watchedPath) |
Provides a filesystem watch polling strategy with a specified watched path.
|
public static PollingStrategy nop()
public static PollingStrategies.ScheduledBuilder regular(java.time.Duration interval)
interval
- an interval between pollingpublic static PollingStrategies.FilesystemWatchBuilder watch(java.nio.file.Path watchedPath)
watchedPath
- a path which should be watchedCopyright © 2018 Oracle Corporation. All rights reserved.