Lines Matching refs:events

38  * Solaris implementation of WatchService based on file events notification
82 // user-watchable events
87 // exception events
94 // background thread to read change events
111 WatchEvent.Kind<?>[] events,
116 return poller.register(dir, events, modifiers);
136 // events (may be changed). set to null when watch key is invalid
137 private volatile Set<? extends WatchEvent.Kind<?>> events;
147 Set<? extends WatchEvent.Kind<?>> events)
152 this.events = events;
169 events = null;
172 Set<? extends WatchEvent.Kind<?>> events() {
173 return events;
176 void setEvents(Set<? extends WatchEvent.Kind<?>> events) {
177 this.events = events;
182 return events != null;
218 // maximum number of events to read per call to port_getn
221 // events that map to ENTRY_DELETE
225 // events that tell us not to re-associate the object
229 // address of event buffers (used to receive events with port_getn)
267 Set<? extends WatchEvent.Kind<?>> events,
294 // return existing watch key after updating events if already
299 updateEvents(watchKey, events);
312 watchKey = new SolarisWatchKey(watcher, dir, fileKey, object, events);
372 * Poller main loop. Blocks on port_getn waiting for events and then
406 int events = unsafe.getInt(address + OFFSETOF_EVENTS);
427 // FILE_EXCEPTION events to tell use not to register the file.
428 // boolean reregister = (events & FILE_EXCEPTION) == 0;
436 processDirectoryEvents((SolarisWatchKey)node, events);
438 boolean ignore = processEntryEvents((EntryNode)node, events);
443 // need to re-associate to get further events
446 events = FILE_MODIFIED | FILE_ATTRIB;
447 if (!isDirectory) events |= FILE_NOFOLLOW;
451 events);
483 * Process directory events. If directory is modified then re-scan
489 key.events().contains(StandardWatchEventKinds.ENTRY_CREATE));
494 * Process events for entries in registered directories. Returns {@code
495 * true} if events are ignored because the watch key has been cancelled.
499 Set<? extends WatchEvent.Kind<?>> events = key.events();
500 if (events == null) {
507 events.contains(StandardWatchEventKinds.ENTRY_MODIFY))
514 events.contains(StandardWatchEventKinds.ENTRY_DELETE))
538 * The {@code sendEvents} parameter indicates if ENTRY_CREATE events
548 // modification events for entries in the directory
549 int events = FILE_NOFOLLOW;
550 if (parent.events().contains(StandardWatchEventKinds.ENTRY_MODIFY))
551 events |= (FILE_MODIFIED | FILE_ATTRIB);
576 object = registerImpl((UnixPath)entry, events);
598 * Update watch key's events. Where the ENTRY_MODIFY changes then we
599 * need to update the events of registered children.
601 void updateEvents(SolarisWatchKey key, Set<? extends WatchEvent.Kind<?>> events) {
602 // update events, rembering if ENTRY_MODIFY was previously
604 boolean wasModifyEnabled = key.events()
606 key.setEvents(events);
609 boolean isModifyEnabled = events
615 // if changed then update events of children
640 long registerImpl(UnixPath dir, int events)
662 events);
748 private static native void portAssociate(int port, int source, long object, int events)
754 private static native void portSend(int port, int events)