根据文档,最好关闭https://github.com/OpenHFT/Chronicle-Map/blob/master/docs/CM_Tutorial.adoc#close-chroniclemap
我不能,出于某种原因:
Map<String, String> lexicalizationGraph = ChronicleMap
.of(String.class, String.class)
.name("lexicalizations-chronicle-map")
.constantKeySizeBySample("bn:14271053n")
.averageValue("average size of value")
.entries(1_000_000_000L)
.createPersistedTo(file);
然后:
lexicalizationGraph.close();
它给了我以下错误:
symbol: method close()
location: variable lexicalizationGraph of type java.util.Map<java.lang.String,java.lang.String>
我该如何关闭它?