Author: toad
Date: 2008-09-27 17:25:12 +0000 (Sat, 27 Sep 2008)
New Revision: 22865

Modified:
   branches/db4o/freenet/src/freenet/client/async/OfferedKeysList.java
   branches/db4o/freenet/src/freenet/node/SendableInsert.java
   branches/db4o/freenet/src/freenet/node/SendableRequest.java
Log:
Move insert getScheduler() to SendableInsert


Modified: branches/db4o/freenet/src/freenet/client/async/OfferedKeysList.java
===================================================================
--- branches/db4o/freenet/src/freenet/client/async/OfferedKeysList.java 
2008-09-27 17:17:29 UTC (rev 22864)
+++ branches/db4o/freenet/src/freenet/client/async/OfferedKeysList.java 
2008-09-27 17:25:12 UTC (rev 22865)
@@ -215,4 +215,12 @@
                return false;
        }

+       @Override
+       public ClientRequestScheduler getScheduler(ClientContext context) {
+               if(isSSK)
+                       return context.getSskFetchScheduler();
+               else
+                       return context.getChkFetchScheduler();
+       }
+
 }

Modified: branches/db4o/freenet/src/freenet/node/SendableInsert.java
===================================================================
--- branches/db4o/freenet/src/freenet/node/SendableInsert.java  2008-09-27 
17:17:29 UTC (rev 22864)
+++ branches/db4o/freenet/src/freenet/node/SendableInsert.java  2008-09-27 
17:25:12 UTC (rev 22865)
@@ -6,6 +6,7 @@
 import com.db4o.ObjectContainer;

 import freenet.client.async.ClientContext;
+import freenet.client.async.ClientRequestScheduler;
 import freenet.support.io.NativeThread;

 /**
@@ -35,4 +36,11 @@
                return true;
        }

+       public ClientRequestScheduler getScheduler(ClientContext context) {
+               if(isSSK())
+                       return context.getSskInsertScheduler();
+               else
+                       return context.getChkInsertScheduler();
+       }
+       
 }

Modified: branches/db4o/freenet/src/freenet/node/SendableRequest.java
===================================================================
--- branches/db4o/freenet/src/freenet/node/SendableRequest.java 2008-09-27 
17:17:29 UTC (rev 22864)
+++ branches/db4o/freenet/src/freenet/node/SendableRequest.java 2008-09-27 
17:25:12 UTC (rev 22865)
@@ -115,14 +115,9 @@
                // FIXME should we deactivate??
                //if(persistent) container.deactivate(cr, 1);
        }
-
-       public ClientRequestScheduler getScheduler(ClientContext context) {
-               if(isSSK())
-                       return context.getSskInsertScheduler();
-               else
-                       return context.getChkInsertScheduler();
-       }

+       public abstract ClientRequestScheduler getScheduler(ClientContext 
context);
+
        /** Is this an SSK? For purposes of determining which scheduler to use. 
*/
        public abstract boolean isSSK();



Reply via email to