< prev index next >

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

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 45,55 **** */ NOSHARE_WRITE(ExtendedOptions.NOSHARE_WRITE), /** * Prevent operations on the file that request delete access. */ ! NOSHARE_DELETE(ExtendedOptions.NOSHARE_DELETE); ExtendedOpenOption(ExtendedOptions.InternalOption<Void> option) { option.register(this); } } --- 45,77 ---- */ NOSHARE_WRITE(ExtendedOptions.NOSHARE_WRITE), /** * Prevent operations on the file that request delete access. */ ! NOSHARE_DELETE(ExtendedOptions.NOSHARE_DELETE), ! ! /** ! * Requires that direct I/O be used for read or write access. ! * Attempting to open a file with this option set will result in ! * an {@code UnsupportedOperationException} if the operating system or ! * file system does not support Direct I/O or a sufficient equivalent. ! * ! * @apiNote ! * The DIRECT option enables performing file I/O directly between user ! * buffers and the file thereby circumventing the operating system page ! * cache and possibly avoiding the thrashing which could otherwise occur ! * in I/O-intensive applications. This option may be of benefit to ! * applications which do their own caching or do random I/O operations ! * on large data sets. It is likely to provide the most benefit when ! * the file is stored on a device which has high I/O throughput capacity. ! * The option should be used with caution however as in general it is ! * likely to degrade performance. The performance effects of using it ! * should be evaluated in each particular circumstance. ! * ! * @since 10 ! */ ! DIRECT(ExtendedOptions.DIRECT); ExtendedOpenOption(ExtendedOptions.InternalOption<Void> option) { option.register(this); } }
< prev index next >