Introduce flags to disable force per instance or globally

The goal here is to:
* be able to selectively choose performance over integrity in some very
  specific cases
* be able to globally disable AtomicFileWriter integrity, and basically
  revert to previous behaviour by setting a system property.
  This flag is meant as an emergency one in case something goes very
  wron on some production system.
This commit is contained in:
Baptiste Mathus committed 2018-01-04 14:35:39 +01:00
1 parent f555cb6e7a
commit 3a5189ebc8
3 files changed
+46 -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, true, StandardOpenOption.WRITE);
writer = new FileChannelWriter(file.toPath(), StandardCharsets.UTF_8, true, true, StandardOpenOption.WRITE);
}
@Test