public class PathSentinel
extends java.lang.Object
| 修飾子とタイプ | フィールドと説明 |
|---|---|
protected java.util.Map<java.nio.file.WatchEvent.Kind<?>,PathEventDispatcher> |
dispatchers |
protected java.util.Deque<PathEvent> |
events |
protected java.util.concurrent.CopyOnWriteArrayList<PathEventListener> |
listeners |
protected java.util.concurrent.ExecutorService |
watcherExecutor |
protected java.nio.file.WatchService |
watchService |
protected java.util.concurrent.ScheduledExecutorService |
workerExecutor |
| コンストラクタと説明 |
|---|
PathSentinel() |
PathSentinel(java.util.concurrent.ExecutorService watcherExecutor,
java.util.concurrent.ScheduledExecutorService workerExecutor) |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
protected boolean |
add(PathEvent event) |
protected void |
clearEvents() |
protected void |
dispatch(PathEvent event) |
protected boolean |
hasEvents() |
PathSentinel |
register(PathEventListener _) |
protected void |
setUpDispatchers() |
void |
shutdown() |
void |
startUp() |
protected void |
startWatcher() |
protected void |
startWorker() |
protected PathEvent |
take() |
PathSentinel |
unregister(PathEventListener _) |
PathSentinel |
watch(java.nio.file.Path path) |
PathSentinel |
watch(java.lang.String path) |
PathSentinel |
watchTree(java.nio.file.Path path) |
protected java.util.Deque<PathEvent> events
protected java.util.concurrent.CopyOnWriteArrayList<PathEventListener> listeners
protected java.util.Map<java.nio.file.WatchEvent.Kind<?>,PathEventDispatcher> dispatchers
protected java.nio.file.WatchService watchService
protected java.util.concurrent.ExecutorService watcherExecutor
protected java.util.concurrent.ScheduledExecutorService workerExecutor
public PathSentinel()
public PathSentinel(@Nonnull
java.util.concurrent.ExecutorService watcherExecutor,
@Nonnull
java.util.concurrent.ScheduledExecutorService workerExecutor)
public PathSentinel watch(@Nonnull java.lang.String path)
public PathSentinel watch(@Nonnull java.nio.file.Path path)
public PathSentinel watchTree(@Nonnull java.nio.file.Path path)
public PathSentinel register(@Nonnull PathEventListener _)
public PathSentinel unregister(@Nonnull PathEventListener _)
public void startUp()
protected void startWatcher()
protected boolean add(PathEvent event)
protected void clearEvents()
protected boolean hasEvents()
protected PathEvent take()
protected void startWorker()
protected void setUpDispatchers()
protected void dispatch(PathEvent event) throws java.io.IOException
java.io.IOExceptionpublic void shutdown()