- Type Parameters:
T- The type of the context object associated with the event
public interface WatchEvent<T>An event or a repeated event for an object that is registered with a
An event is classified by its
kindand has a
countto indicate the number of times that the event has been observed. This allows for efficient representation of repeated events. The
contextmethod 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.
Nested Class Summary
Nested Classes Modifier and Type Interface Description
WatchEvent.Kind<T>An event kind, for the purposes of identification.
WatchEvent.ModifierAn event modifier that qualifies how a
Watchableis registered with a
All Methods Instance Methods Abstract Methods Modifier and Type Method Description
context()Returns the context for the event.
count()Returns the event count.
kind()Returns the event kind.
WatchEvent.Kind<T> kind()Returns the event kind.
- the event kind
int count()Returns the event count. If the event count is greater than
1then this is a repeated event.
- the event count
T context()Returns the context for the event.
In the case of
ENTRY_MODIFYevents the context is a
Paththat is the
relativepath between the directory registered with the watch service, and the entry that is created, deleted, or modified.
- the event context; may be