Home
last modified time | relevance | path

Searched refs:watchKey (Results 1 – 2 of 2) sorted by relevance

/libcore/ojluni/src/main/java/sun/nio/fs/
DPollingWatchService.java160 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 …]
/libcore/luni/src/test/java/libcore/java/nio/file/
DWatchServiceTest.java88 WatchKey watchKey = watchService.poll(2, TimeUnit.SECONDS); in checkWatchServiceEventMultipleKeys() local
89 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()