Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
Limit the time Transmission.Chunks stay in the transmissionCloud by using a Map that iterates entires in insertion order.
hermense49e2d75fee5
diff --git a/source/de/anomic/yacy/dht/Dispatcher.java b/source/de/anomic/yacy/dht/Dispatcher.javaindex 9ff5871fa..a6982873b 100755--- a/source/de/anomic/yacy/dht/Dispatcher.java+++ b/source/de/anomic/yacy/dht/Dispatcher.java@@ -29,8 +29,8 @@ import java.io.IOException;import java.util.ArrayList;import java.util.HashSet;import java.util.Iterator;+import java.util.LinkedHashMap;import java.util.Map;-import java.util.TreeMap;import de.anomic.kelondro.order.Base64Order;import de.anomic.kelondro.text.BufferedIndex;@@ -80,7 +80,7 @@ public class Dispatcher {// a cloud is a cache for the objects that wait to be transmitted// the String-key is the primary target as contained in the Entry- private TreeMap<byte[], Transmission.Chunk> transmissionCloud;+ private Map<byte[], Transmission.Chunk> transmissionCloud;// the backend is used to store the remaining indexContainers in case that the object is closedprivate BufferedIndex<WordReference> backend;@@ -104,7 +104,7 @@ public class Dispatcher {final boolean gzipBody,final int timeout) {- this.transmissionCloud = new TreeMap<byte[], Transmission.Chunk>(Base64Order.enhancedCoder);+ this.transmissionCloud = new LinkedHashMap<byte[], Transmission.Chunk>();this.backend = backend;this.seeds = seeds;this.log = new Log("INDEX-TRANSFER-DISPATCHER");