Author: toad
Date: 2008-02-13 17:09:09 +0000 (Wed, 13 Feb 2008)
New Revision: 17867
Modified:
trunk/freenet/src/freenet/l10n/freenet.l10n.en.properties
trunk/freenet/src/freenet/node/LocationManager.java
trunk/freenet/src/freenet/node/Node.java
Log:
New option enableSwapQueueing controls swap queueing
Modified: trunk/freenet/src/freenet/l10n/freenet.l10n.en.properties
===================================================================
--- trunk/freenet/src/freenet/l10n/freenet.l10n.en.properties 2008-02-13
16:50:23 UTC (rev 17866)
+++ trunk/freenet/src/freenet/l10n/freenet.l10n.en.properties 2008-02-13
17:09:09 UTC (rev 17867)
@@ -597,6 +597,8 @@
Node.enablePerNodeFailureTablesLong=Enable automatically rerouting around
nodes that failed a request within the last 10 minutes?
Node.enableSwapping=Enable location swapping? (DO NOT TURN THIS OFF!)
Node.enableSwappingLong=Enable location swapping? (DO NOT TURN THIS OFF! It is
only useful in some simulations).
+Node.enableSwapQueueing=Enable queueing of swap requests? (DO NOT TURN THIS
OFF!)
+Node.enableSwapQueueingLong=Enable queueing of swap requests? (DO NOT TURN
THIS OFF!)
Node.enableULPRDataPropagation=Enable ULPR data propagation?
Node.enableULPRDataPropagationLong=Enable fast propagation of recently
requested keys to those nodes which have asked for them when the data is
eventually found? (Ultra-Lightweight Persistent Requests).
Node.errorApplyingConfig=Error while applying the new config : ${error}
Modified: trunk/freenet/src/freenet/node/LocationManager.java
===================================================================
--- trunk/freenet/src/freenet/node/LocationManager.java 2008-02-13 16:50:23 UTC
(rev 17866)
+++ trunk/freenet/src/freenet/node/LocationManager.java 2008-02-13 17:09:09 UTC
(rev 17867)
@@ -902,7 +902,8 @@
runNow = true;
} else {
// Locked.
- if(incomingMessageQueue.size() >
MAX_INCOMING_QUEUE_LENGTH) {
+ if(node.enableSwapQueueing ||
+ incomingMessageQueue.size() >
MAX_INCOMING_QUEUE_LENGTH) {
// Reject anyway.
reject = true;
swapsRejectedAlreadyLocked++;
Modified: trunk/freenet/src/freenet/node/Node.java
===================================================================
--- trunk/freenet/src/freenet/node/Node.java 2008-02-13 16:50:23 UTC (rev
17866)
+++ trunk/freenet/src/freenet/node/Node.java 2008-02-13 17:09:09 UTC (rev
17867)
@@ -399,6 +399,7 @@
final boolean enablePerNodeFailureTables;
final boolean enableULPRDataPropagation;
final boolean enableSwapping;
+ boolean enableSwapQueueing;
public static final short DEFAULT_MAX_HTL = (short)10;
private short maxHTL;
/** Type identifier for fproxy node to node messages, as sent on
DMT.nodeToNodeMessage's */
@@ -812,6 +813,18 @@
});
enableSwapping = nodeConfig.getBoolean("enableSwapping");
+ nodeConfig.register("enableSwapQueueing", true, sortOrder++,
true, false, "Node.enableSwapQueueing", "Node.enableSwapQueueingLong", new
BooleanCallback() {
+ public boolean get() {
+ return enableSwapQueueing;
+ }
+
+ public void set(boolean val) throws
InvalidConfigValueException {
+ enableSwapQueueing = val;
+ }
+
+ });
+ enableSwapQueueing =
nodeConfig.getBoolean("enableSwapQueueing");
+
// Determine the port number
// @see #191
if(oldConfig != null &&
"-1".equals(oldConfig.get("node.listenPort")))