Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
added object cache miss-cache use for remove method
orbiter1591a5596377
diff --git a/source/de/anomic/kelondro/kelondroTree.java b/source/de/anomic/kelondro/kelondroTree.javaindex 395fefb01..ec9790be2 100644--- a/source/de/anomic/kelondro/kelondroTree.java+++ b/source/de/anomic/kelondro/kelondroTree.java@@ -635,6 +635,12 @@ public class kelondroTree extends kelondroRecords implements kelondroIndex {// Removes the mapping for this key from this map if present (optional operation).public kelondroRow.Entry remove(byte[] key) throws IOException {++ // check with miss cache of object cache+ // if we know that the object does not exist, then we don't need to lookup in the file+ if ((objectCache != null) && (objectCache.has(key) == -1)) return null;++ // delete from databasesynchronized(writeSearchObj) {if (objectCache != null) objectCache.remove(key);writeSearchObj.process(key);@@ -644,6 +650,7 @@ public class kelondroTree extends kelondroRecords implements kelondroIndex {remove(result, writeSearchObj.getParent());return values;} else {+ if (objectCache != null) objectCache.hasnot(key);return null;}}