[freenet-cvs] r12031 - trunk/freenet/src/freenet/node

nextgens at freenetproject.org nextgens at freenetproject.org
Thu Mar 8 12:55:28 UTC 2007


Author: nextgens
Date: 2007-03-08 12:55:27 +0000 (Thu, 08 Mar 2007)
New Revision: 12031

Modified:
   trunk/freenet/src/freenet/node/LocationManager.java
Log:
Add a few comments.

Modified: trunk/freenet/src/freenet/node/LocationManager.java
===================================================================
--- trunk/freenet/src/freenet/node/LocationManager.java	2007-03-08 12:26:32 UTC (rev 12030)
+++ trunk/freenet/src/freenet/node/LocationManager.java	2007-03-08 12:55:27 UTC (rev 12031)
@@ -1040,8 +1040,13 @@
         Long longTime = new Long(timestamp.getTime());
         
         synchronized(knownLocs) {
+        		// FIXME: The TreeMap size will keep on increasing...
+        		// knownLocs.values().remove(dd); would be costy
+        		// Maybe the best solution is to do a 
+        		// knownLocs = knownLocs.headMap(longTime - arbitrary_value)
+        	
         		//Add the location to the map with the current timestamp as key
-        		knownLocs.put(longTime, dd);
+        		knownLocs.put(longTime, dd);	
         }
 		if(logMINOR) Logger.minor(this, "Estimated net size(session): "+knownLocs.size());
     }




More information about the cvs mailing list