public class PollingPathWatchService extends PathWatchService
FLAG_ACCURATE, FLAG_FILTER_ENTRY_CREATE, FLAG_FILTER_ENTRY_DELETE, FLAG_FILTER_ENTRY_MODIFY, FLAG_FILTER_ENTRY_RENAME_FROM, FLAG_FILTER_ENTRY_RENAME_TO, FLAG_FILTER_KEY_INVALID, FLAG_WATCH_SUBTREE| Constructor and Description |
|---|
PollingPathWatchService() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
long |
getPollInterval() |
WatchKey |
poll() |
WatchKey |
poll(long timeout,
java.util.concurrent.TimeUnit unit) |
PathWatchKey |
register(Path path,
WatchEvent.Kind<?>[] kinds,
WatchEvent.Modifier[] modifiers) |
boolean |
reset(PathWatchKey pathWatchKey) |
void |
setPollInterval(long pollInterval) |
WatchKey |
take() |
checkAndCastToPathImpl, makeFlagMaskpublic PathWatchKey register(Path path, WatchEvent.Kind<?>[] kinds, WatchEvent.Modifier[] modifiers) throws java.io.IOException
register in class PathWatchServicejava.io.IOExceptionpublic boolean reset(PathWatchKey pathWatchKey)
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class WatchServicejava.io.IOExceptionpublic WatchKey poll() throws java.lang.InterruptedException, ClosedWatchServiceException
poll in class WatchServicejava.lang.InterruptedExceptionClosedWatchServiceExceptionpublic WatchKey poll(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException, ClosedWatchServiceException
poll in class WatchServicejava.lang.InterruptedExceptionClosedWatchServiceExceptionpublic WatchKey take() throws java.lang.InterruptedException, ClosedWatchServiceException
take in class WatchServicejava.lang.InterruptedExceptionClosedWatchServiceExceptionpublic long getPollInterval()
public void setPollInterval(long pollInterval)