@ConfigurationProperties(value="micronaut.io.watch") @Requires(property="micronaut.io.watch.paths") public class FileWatchConfiguration extends java.lang.Object implements Toggleable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ENABLED
Setting to enable and disable server watch.
|
static java.lang.String |
PATHS
The watch paths.
|
static java.lang.String |
PREFIX
The prefix to use to configure the watch service.
|
static java.lang.String |
RESTART
Setting to enable and disable restart.
|
Constructor and Description |
---|
FileWatchConfiguration() |
Modifier and Type | Method and Description |
---|---|
java.time.Duration |
getCheckInterval()
The interval to wait between checks.
|
java.util.List<java.nio.file.Path> |
getPaths()
The paths to watch.
|
boolean |
isEnabled() |
boolean |
isRestart()
Should the server be shutdown when a watch event fires.
|
void |
setCheckInterval(java.time.Duration checkInterval)
Sets the interval to wait between file watch polls.
|
void |
setEnabled(boolean enabled)
Whether watch is enabled.
|
void |
setPaths(java.util.List<java.nio.file.Path> paths)
Sets the watch paths to use.
|
void |
setRestart(boolean restart)
Set whether restart is enabled.
|
public static final java.lang.String PREFIX
public static final java.lang.String PATHS
public static final java.lang.String ENABLED
public static final java.lang.String RESTART
public boolean isEnabled()
isEnabled
in interface Toggleable
public boolean isRestart()
gradle run --continuous
or Kubernetes replication controller is required to restart the container.public void setRestart(boolean restart)
restart
- True if restart is to be enabledisRestart()
public void setEnabled(boolean enabled)
enabled
- True if is enabledpublic java.util.List<java.nio.file.Path> getPaths()
Path
objectspublic void setPaths(@NonNull java.util.List<java.nio.file.Path> paths)
paths
- The watch paths@NonNull public java.time.Duration getCheckInterval()
public void setCheckInterval(@NonNull java.time.Duration checkInterval)
checkInterval
- The check interval