< prev index next >

src/jdk.unsupported/share/classes/com/sun/nio/file/SensitivityWatchEventModifier.java

Print this page

        

*** 24,34 **** */ package com.sun.nio.file; import java.nio.file.WatchEvent.Modifier; ! import sun.nio.fs.ExtendedOptions; /** * Defines the <em>sensitivity levels</em> when registering objects with a * watch service implementation that polls the file system. * --- 24,34 ---- */ package com.sun.nio.file; import java.nio.file.WatchEvent.Modifier; ! import jdk.internal.unsupported.FileSystemOption; /** * Defines the <em>sensitivity levels</em> when registering objects with a * watch service implementation that polls the file system. *
*** 37,65 **** public enum SensitivityWatchEventModifier implements Modifier { /** * High sensitivity. */ ! HIGH(ExtendedOptions.SENSITIVITY_HIGH, 2), /** * Medium sensitivity. */ ! MEDIUM(ExtendedOptions.SENSITIVITY_MEDIUM, 10), /** * Low sensitivity. */ ! LOW(ExtendedOptions.SENSITIVITY_LOW, 30); /** * Returns the sensitivity in seconds. */ public int sensitivityValueInSeconds() { return sensitivity; } private final int sensitivity; ! private SensitivityWatchEventModifier(ExtendedOptions.InternalOption<Integer> option, int sensitivity) { this.sensitivity = sensitivity; option.register(this, sensitivity); } } --- 37,65 ---- public enum SensitivityWatchEventModifier implements Modifier { /** * High sensitivity. */ ! HIGH(FileSystemOption.SENSITIVITY_HIGH, 2), /** * Medium sensitivity. */ ! MEDIUM(FileSystemOption.SENSITIVITY_MEDIUM, 10), /** * Low sensitivity. */ ! LOW(FileSystemOption.SENSITIVITY_LOW, 30); /** * Returns the sensitivity in seconds. */ public int sensitivityValueInSeconds() { return sensitivity; } private final int sensitivity; ! private SensitivityWatchEventModifier(FileSystemOption<Integer> option, int sensitivity) { this.sensitivity = sensitivity; option.register(this, sensitivity); } }
< prev index next >