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, makeFlagMask
public PathWatchKey register(Path path, WatchEvent.Kind<?>[] kinds, WatchEvent.Modifier[] modifiers) throws java.io.IOException
register
in class PathWatchService
java.io.IOException
public boolean reset(PathWatchKey pathWatchKey)
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class WatchService
java.io.IOException
public WatchKey poll() throws java.lang.InterruptedException, ClosedWatchServiceException
poll
in class WatchService
java.lang.InterruptedException
ClosedWatchServiceException
public WatchKey poll(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException, ClosedWatchServiceException
poll
in class WatchService
java.lang.InterruptedException
ClosedWatchServiceException
public WatchKey take() throws java.lang.InterruptedException, ClosedWatchServiceException
take
in class WatchService
java.lang.InterruptedException
ClosedWatchServiceException
public long getPollInterval()
public void setPollInterval(long pollInterval)