Author: toad
Date: 2008-05-28 22:28:05 +0000 (Wed, 28 May 2008)
New Revision: 20119
Modified:
branches/db4o/freenet/src/freenet/client/async/ClientRequestScheduler.java
branches/db4o/freenet/src/freenet/node/NodeClientCore.java
Log:
Make the databaseExecutor a PrioritizedSerialExecutor
Modified:
branches/db4o/freenet/src/freenet/client/async/ClientRequestScheduler.java
===================================================================
--- branches/db4o/freenet/src/freenet/client/async/ClientRequestScheduler.java
2008-05-28 22:25:52 UTC (rev 20118)
+++ branches/db4o/freenet/src/freenet/client/async/ClientRequestScheduler.java
2008-05-28 22:28:05 UTC (rev 20119)
@@ -24,6 +24,7 @@
import freenet.node.SendableInsert;
import freenet.node.SendableRequest;
import freenet.support.Logger;
+import freenet.support.PrioritizedSerialExecutor;
import freenet.support.SerialExecutor;
import freenet.support.api.StringCallback;
@@ -93,7 +94,7 @@
public final String name;
private final CooldownQueue transientCooldownQueue;
private final CooldownQueue persistentCooldownQueue;
- private final SerialExecutor databaseExecutor;
+ private final PrioritizedSerialExecutor databaseExecutor;
public static final String PRIORITY_NONE = "NONE";
public static final String PRIORITY_SOFT = "SOFT";
Modified: branches/db4o/freenet/src/freenet/node/NodeClientCore.java
===================================================================
--- branches/db4o/freenet/src/freenet/node/NodeClientCore.java 2008-05-28
22:25:52 UTC (rev 20118)
+++ branches/db4o/freenet/src/freenet/node/NodeClientCore.java 2008-05-28
22:28:05 UTC (rev 20119)
@@ -49,6 +49,7 @@
import freenet.support.Base64;
import freenet.support.Executor;
import freenet.support.Logger;
+import freenet.support.PrioritizedSerialExecutor;
import freenet.support.SerialExecutor;
import freenet.support.SimpleFieldSet;
import freenet.support.api.BooleanCallback;
@@ -113,7 +114,7 @@
* - No need to refresh live objects.
* - Deactivation is simpler.
*/
- public final SerialExecutor clientDatabaseExecutor;
+ public final PrioritizedSerialExecutor clientDatabaseExecutor;
public static int maxBackgroundUSKFetchers;
@@ -139,7 +140,7 @@
else prio = NativeThread.MIN_PRIORITY;
clientSlowSerialExecutor[i] = new SerialExecutor(prio);
}
- clientDatabaseExecutor = new
SerialExecutor(NativeThread.NORM_PRIORITY);
+ clientDatabaseExecutor = new
PrioritizedSerialExecutor(NativeThread.NORM_PRIORITY,
NativeThread.MAX_PRIORITY, NativeThread.NORM_PRIORITY);
byte[] pwdBuf = new byte[16];
random.nextBytes(pwdBuf);
this.formPassword = Base64.encode(pwdBuf);