WatchService.
An event is classified by its kind and has a count to indicate the number of times that the event has been
observed. This allows for efficient representation of repeated events. The
context method returns any context associated with
the event. In the case of a repeated event then the context is the same for
all events.
Watch events are immutable and safe for use by multiple concurrent threads.
| Modifier and Type | Class and Description |
|---|---|
| public static interface | WatchEvent.
The type of the context object associated with the event T>An event kind, for the purposes of identification. |
| public static interface | WatchEvent.
An event modifier that qualifies how a |
| Modifier and Type | Method and Description |
|---|---|
| public T | |
| public int | |
| public WatchEvent. |
| context | back to summary |
|---|---|
| public T context() Returns the context for the event. In the case of
| |
| count | back to summary |
|---|---|
| public int count() Returns the event count. If the event count is greater than
| |
| kind | back to summary |
|---|---|
| public WatchEvent. Returns the event kind.
| |
StandardWatchEventKinds
| name | back to summary |
|---|---|
| public String name() Returns the name of the event kind.
| |
| type | back to summary |
|---|---|
| public Class Returns the type of the
| |
Watchable is registered
with a WatchService.
This release does not define any standard modifiers.
Watchable#register
| Modifier and Type | Method and Description |
|---|---|
| public String |
| name | back to summary |
|---|---|
| public String name() Returns the name of the modifier.
| |