Author: xor
Date: 2009-01-12 17:38:42 +0000 (Mon, 12 Jan 2009)
New Revision: 25025

Modified:
   trunk/freenet/src/freenet/support/TransferThread.java
Log:
Provide functions for counting the amount of fetches/inserts.

Modified: trunk/freenet/src/freenet/support/TransferThread.java
===================================================================
--- trunk/freenet/src/freenet/support/TransferThread.java       2009-01-12 
17:23:55 UTC (rev 25024)
+++ trunk/freenet/src/freenet/support/TransferThread.java       2009-01-12 
17:38:42 UTC (rev 25025)
@@ -135,6 +135,18 @@
                Logger.debug(this, "Removed insert for " + p.getURI());
        }
        
+       protected int fetchCount() {
+               synchronized(mFetches) {
+                       return mFetches.size();
+               }
+       }
+       
+       protected int insertCount() {
+               synchronized(mInserts) {
+                       return mInserts.size();
+               }
+       }
+       
        public void terminate() {
                isRunning = false;
                mThread.interrupt();

_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs

Reply via email to