| Modifier and Type | Class and Description |
|---|---|
| private static class | PollingWatchService.
Entry in directory cache to record file last-modified-time and tick-count |
| private class | PollingWatchService.
WatchKey implementation that encapsulates a map of the entries of the entries in the directory. |
| Modifier and Type | Field and Description |
|---|---|
| private final Map | |
| private static final int | |
| private final ScheduledExecutorService |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | implClose()
Implements abstract sun. Closes this watch service. |
| pack-priv WatchKey | register(final Path path, WatchEvent.
Implements abstract sun. Register the given file with this watch service |
| map | back to summary |
|---|---|
| private final Map<Object, PollingWatchService. | |
| POLLING_INTERVAL | back to summary |
|---|---|
| private static final int POLLING_INTERVAL | |
| scheduledExecutor | back to summary |
|---|---|
| private final ScheduledExecutorService scheduledExecutor | |
| PollingWatchService | back to summary |
|---|---|
| pack-priv PollingWatchService() | |
| implClose | back to summary |
|---|---|
| pack-priv void implClose() throws IOException Implements abstract sun. Doc from sun. Closes this watch service. This method is invoked by the close method to perform the actual work of closing the watch service.
| |
| register | back to summary |
|---|---|
| pack-priv WatchKey register(final Path path, WatchEvent. Implements abstract sun. Register the given file with this watch service
| |
| Modifier and Type | Field and Description |
|---|---|
| private FileTime | |
| private int |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv FileTime | |
| pack-priv int | |
| pack-priv void |
| lastModified | back to summary |
|---|---|
| private FileTime lastModified | |
| lastTickCount | back to summary |
|---|---|
| private int lastTickCount | |
| CacheEntry | back to summary |
|---|---|
| pack-priv CacheEntry(FileTime lastModified, int lastTickCount) | |
| lastModified | back to summary |
|---|---|
| pack-priv FileTime lastModified() | |
| lastTickCount | back to summary |
|---|---|
| pack-priv int lastTickCount() | |
| update | back to summary |
|---|---|
| pack-priv void update(FileTime lastModified, int tickCount) | |
| Modifier and Type | Field and Description |
|---|---|
| private Map | |
| private Set | |
| private final Object | |
| private ScheduledFuture | |
| private int | |
| private volatile boolean |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv Object | |
| pack-priv void | |
| public boolean | |
| pack-priv synchronized void |
| entries | back to summary |
|---|---|
| private Map<Path, PollingWatchService. | |
| events | back to summary |
|---|---|
| private Set<? extends WatchEvent. | |
| fileKey | back to summary |
|---|---|
| private final Object fileKey | |
| poller | back to summary |
|---|---|
| private ScheduledFuture<?> poller | |
| tickCount | back to summary |
|---|---|
| private int tickCount | |
| valid | back to summary |
|---|---|
| private volatile boolean valid | |
| PollingWatchKey | back to summary |
|---|---|
| pack-priv PollingWatchKey(Path dir, PollingWatchService watcher, Object fileKey) throws IOException | |
| cancel | back to summary |
|---|---|
| public void cancel() Implements java. Doc from java. Cancels the registration with the watch service. Upon return the watch key
will be invalid. If the watch key is enqueued, waiting to be retrieved
from the watch service, then it will remain in the queue until it is
removed. Pending events, if any, remain pending and may be retrieved by
invoking the If this watch key has already been cancelled then invoking this method has no effect. Once cancelled, a watch key remains forever invalid.
| |
| disable | back to summary |
|---|---|
| pack-priv void disable() | |
| enable | back to summary |
|---|---|
| pack-priv void enable(Set<? extends WatchEvent. | |
| fileKey | back to summary |
|---|---|
| pack-priv Object fileKey() | |
| invalidate | back to summary |
|---|---|
| pack-priv void invalidate() | |
| isValid | back to summary |
|---|---|
| public boolean isValid() Implements java. Doc from java. Tells whether or not this watch key is valid. A watch key is valid upon creation and remains until it is cancelled, or its watch service is closed.
| |
| poll | back to summary |
|---|---|
| pack-priv synchronized void poll() Polls the directory to detect for new files, modified files, or deleted files. | |