Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
some additions to kelondroCollection
orbiterb30645305bb6
diff --git a/source/de/anomic/kelondro/kelondroCollection.java b/source/de/anomic/kelondro/kelondroCollection.javaindex f3a142b5c..f950a377d 100644--- a/source/de/anomic/kelondro/kelondroCollection.java+++ b/source/de/anomic/kelondro/kelondroCollection.java@@ -85,6 +85,32 @@ public class kelondroCollection {}}+ public long lastRead() {+ return lastTimeRead;+ }++ public long lastWrote() {+ return lastTimeWrote;+ }++ public byte[] get(int index) {+ assert (index < chunkcount);+ byte[] a = new byte[chunksize];+ synchronized (chunkcache) {+ System.arraycopy(chunkcache, index * chunksize, a, 0, chunksize);+ }+ return a;+ }++ public byte[] get(byte[] key) {+ assert (key.length <= chunksize);+ synchronized (chunkcache) {+ int i = find(key);+ if (i >= 0) return get(i);+ }+ return null;+ }+public void add(byte[] a) {assert (a.length <= chunksize);synchronized (chunkcache) {