Searched refs:watchKey (Results 1 – 2 of 2) sorted by relevance
160 PollingWatchKey watchKey;162 watchKey = map.get(fileKey);163 if (watchKey == null) {165 watchKey = new PollingWatchKey(path, this, fileKey);166 map.put(fileKey, watchKey);169 watchKey.disable();172 watchKey.enable(events, sensivity.sensitivityValueInSeconds());173 return watchKey;182 PollingWatchKey watchKey = entry.getValue();183 watchKey.disable();[all …]
88 WatchKey watchKey = watchService.poll(2, TimeUnit.SECONDS); in checkWatchServiceEventMultipleKeys() local89 assertNotNull(watchKey); in checkWatchServiceEventMultipleKeys()91 List<WatchEventResult> expectedEvents = expectedResultsCopy.get(watchKey); in checkWatchServiceEventMultipleKeys()95 for (WatchEvent<?> event : watchKey.pollEvents()) { in checkWatchServiceEventMultipleKeys()105 assertEquals(expectedResetResult, watchKey.reset()); in checkWatchServiceEventMultipleKeys()107 expectedResultsCopy.remove(watchKey); in checkWatchServiceEventMultipleKeys()