};
//TODO Make stats collection configurable as it add slight overhead
nodeCache = builder.buildNodeCache(this);
nodeCacheStats = new CacheStats(nodeCache, "Document-NodeState",
builder.getWeigher(), builder.getNodeCacheSize());
nodeChildrenCache = builder.buildChildrenCache();
nodeChildrenCacheStats = new CacheStats(nodeChildrenCache, "Document-NodeChildren",
builder.getWeigher(), builder.getChildrenCacheSize());
docChildrenCache = builder.buildDocChildrenCache();
docChildrenCacheStats = new CacheStats(docChildrenCache, "Document-DocChildren",
builder.getWeigher(), builder.getDocChildrenCacheSize());
diffCache = builder.getDiffCache();
checkpoints = new Checkpoints(this);