+ for (WatchEvent<?> event : key.pollEvents()) {
+ WatchEvent.Kind<?> kind = event.kind();
+ // TBD - provide example of how OVERFLOW event is handled
+ if (kind == OVERFLOW)
+ continue;
+ // Context for directory entry event is the file name of entry
+ WatchEvent<Path> evt = cast(event);
+ Path name = evt.context();
+ LOGGER.error(String.format("MISSED EVENT: %s: %s", event.kind().name(), name));
+ }
+ boolean valid = key.reset();
+ LOGGER.error("RESET KEY RETURNED: " + valid);