@Test public void testDefaultConfig() { WatchService watchService = WatchServiceConfiguration.DEFAULT.newWatchService(fs.getDefaultView(), fs.getPathService()); assertThat(watchService).isInstanceOf(PollingWatchService.class); PollingWatchService pollingWatchService = (PollingWatchService) watchService; assertThat(pollingWatchService.interval).isEqualTo(5); assertThat(pollingWatchService.timeUnit).isEqualTo(SECONDS); }
abstract AbstractWatchService newWatchService(FileSystemView view, PathService pathService);
WatchServiceConfiguration { abstract AbstractWatchService newWatchService(FileSystemView view, PathService pathService); }
WatchServiceConfiguration { abstract AbstractWatchService newWatchService(FileSystemView view, PathService pathService); WatchServiceConfiguration(); }
WatchServiceConfiguration { abstract AbstractWatchService newWatchService(FileSystemView view, PathService pathService); WatchServiceConfiguration(); @SuppressWarnings("GoodTime") // should accept a java.time.Duration static WatchServiceConfiguration polling(long interval, TimeUnit timeUnit); }
WatchServiceConfiguration { abstract AbstractWatchService newWatchService(FileSystemView view, PathService pathService); WatchServiceConfiguration(); @SuppressWarnings("GoodTime") // should accept a java.time.Duration static WatchServiceConfiguration polling(long interval, TimeUnit timeUnit);  }