| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private static enum | AbstractWatchKey.
Possible key states |
| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| private final Path | |
| private List | |
| private Map | |
| pack-priv static final int | MAX_EVENT_LIST_SIZE
Maximum size of event list before dropping events and signalling OVERFLOW |
| pack-priv static final AbstractWatchKey. | OVERFLOW_EVENT
Special event to signal overflow |
| private AbstractWatchKey. | |
| private final AbstractWatchService |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public final List | pollEvents()
Implements java. Retrieves and removes all pending events for this watch key, returning
a |
| public final boolean | |
| pack-priv final void | |
| pack-priv final void | |
| public Path | |
| pack-priv final AbstractWatchService |
| DEFAULT_MAX_EVENT_LIST_SIZE | back to summary |
|---|---|
| private static final int DEFAULT_MAX_EVENT_LIST_SIZE | |
| dir | back to summary |
|---|---|
| private final Path dir | |
| events | back to summary |
|---|---|
| private List<WatchEvent<?>> events | |
| lastModifyEvents | back to summary |
|---|---|
| private Map<Object, WatchEvent<?>> lastModifyEvents | |
| MAX_EVENT_LIST_SIZE | back to summary |
|---|---|
| pack-priv static final int MAX_EVENT_LIST_SIZE Maximum size of event list before dropping events and signalling OVERFLOW | |
| OVERFLOW_EVENT | back to summary |
|---|---|
| pack-priv static final AbstractWatchKey. Special event to signal overflow | |
| state | back to summary |
|---|---|
| private AbstractWatchKey. | |
| watcher | back to summary |
|---|---|
| private final AbstractWatchService watcher | |
| AbstractWatchKey | back to summary |
|---|---|
| protected AbstractWatchKey(Path dir, AbstractWatchService watcher) | |
| pollEvents | back to summary |
|---|---|
| public final List Implements java. Doc from java. Retrieves and removes all pending events for this watch key, returning
a Note that this method does not wait if there are no events pending.
| |
| reset | back to summary |
|---|---|
| public final boolean reset() Implements java. Doc from java. Resets this watch key. If this watch key has been cancelled or this watch key is already in the ready state then invoking this method has no effect. Otherwise if there are pending events for the object then this watch key is immediately re-queued to the watch service. If there are no pending events then the watch key is put into the ready state and will remain in that state until an event is detected or the watch key is cancelled.
| |
| signal | back to summary |
|---|---|
| pack-priv final void signal() Enqueues this key to the watch service | |
| signalEvent | back to summary |
|---|---|
| pack-priv final void signalEvent(WatchEvent. Adds the event to this key and signals it.
| |
| watchable | back to summary |
|---|---|
| public Path watchable() Implements java. Return the original watchable (Path)
| |
| watcher | back to summary |
|---|---|
| pack-priv final AbstractWatchService watcher() | |
| Modifier and Type | Field and Description |
|---|---|
| private final T | |
| private int | |
| private final WatchEvent. |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public T | |
| public int | |
| pack-priv void | |
| public WatchEvent. |
| context | back to summary |
|---|---|
| private final T context | |
| count | back to summary |
|---|---|
| private int count | |
| kind | back to summary |
|---|---|
| private final WatchEvent. | |
| Event | back to summary |
|---|---|
| pack-priv Event(WatchEvent. | |
| context | back to summary |
|---|---|
| public T context() Implements java. Doc from java. Returns the context for the event. In the case of
| |
| count | back to summary |
|---|---|
| public int count() Implements java. Doc from java. Returns the event count. If the event count is greater than
| |
| increment | back to summary |
|---|---|
| pack-priv void increment() | |
| kind | back to summary |
|---|---|
| public WatchEvent. Implements java. Doc from java. Returns the event kind.
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final AbstractWatchKey. | |
| public static final AbstractWatchKey. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static AbstractWatchKey. | |
| public static AbstractWatchKey. |
| READY | back to summary |
|---|---|
| public static final AbstractWatchKey. | |
| SIGNALLED | back to summary |
|---|---|
| public static final AbstractWatchKey. | |
| State | back to summary |
|---|---|
| private State() | |
| valueOf | back to summary |
|---|---|
| public static AbstractWatchKey. | |
| values | back to summary |
|---|---|
| public static AbstractWatchKey. | |