Flush persistence file contents on ChronicleMap.close()

This commit is contained in:
leventov
2015-11-26 15:31:48 +03:00
parent 5b17d4fefc
commit e29a473e05
@@ -523,6 +523,13 @@ public abstract class VanillaChronicleHash<K,
if (closed)
return;
closed = true;
if (file != null) {
try (RandomAccessFile raf = new RandomAccessFile(file, "rw")) {
raf.getChannel().force(true);
} catch (IOException e) {
throw new RuntimeException(e);
}
}
bs = null;
file = null;
}