public interface ChronicleHash extends Closeable
ChronicleMap
and ChronicleSet
, related to off-heap
memory management and file-mapping. Not usable by itself.File file()
ChronicleHashBuilder.create()
call, or null
if it is purely in-memory,
i. e. if it is created by ChronicleHashBuilder.create()
call.ChronicleMap
or ChronicleSet
is mapped to,
or null
if it is not mapped to any fileChronicleHashBuilder.createPersistedTo(java.io.File)
void close()
ChronicleMap
or ChronicleSet
instances mapping the same data.
If you won't call this method, memory would be held at least until next garbage
collection. This could be a problem if, for example, you target rare garbage collections,
but load and drop ChronicleHash
es regularly.
TODO what about commit guarantees, when ChronicleMap is used with memory-mapped files, if
ChronicleMap
/ChronicleSet
closed/not?
After this method call behaviour of all methods of ChronicleMap
or ChronicleSet
is undefined. Any method call on the map might throw
any exception, or even JVM crash. Shortly speaking, don't call use map closing.
close
in interface AutoCloseable
close
in interface Closeable
Copyright © 2016. All rights reserved.