New flag to FileChannel.force() on each Writer.flush() or not

And disable FileChannel.force() in the case of AtomicFileWriter.
See the committed javadoc for the full why.
This commit is contained in:
Baptiste Mathus committed 2017-12-03 23:33:44 +01:00
1 parent 9fb07a2c1a
commit 1191bb0ef0
3 files changed
+33 -4

No files matched your search

@@ -27,7 +27,7 @@ public class FileChannelWriterTest {
@Before
public void setUp() throws Exception {
file = temporaryFolder.newFile();
writer = new FileChannelWriter(file.toPath(), StandardCharsets.UTF_8, StandardOpenOption.WRITE);
writer = new FileChannelWriter(file.toPath(), StandardCharsets.UTF_8, true, StandardOpenOption.WRITE);
}
@Test