Author: toad
Date: 2008-02-23 21:26:28 +0000 (Sat, 23 Feb 2008)
New Revision: 18140
Modified:
trunk/freenet/src/freenet/client/async/ClientRequestScheduler.java
trunk/freenet/src/freenet/node/RequestScheduler.java
Log:
Move COOLDOWN_ constants to RequestScheduler interface.
Modified: trunk/freenet/src/freenet/client/async/ClientRequestScheduler.java
===================================================================
--- trunk/freenet/src/freenet/client/async/ClientRequestScheduler.java
2008-02-23 21:25:47 UTC (rev 18139)
+++ trunk/freenet/src/freenet/client/async/ClientRequestScheduler.java
2008-02-23 21:26:28 UTC (rev 18140)
@@ -98,14 +98,6 @@
public final String name;
private final LinkedList /* <WeakReference <RandomGrabArray> > */
recentSuccesses = new LinkedList();
private final RequestCooldownQueue cooldownQueue;
- /** Once a key has been requested a few times, don't request it again
for 30 minutes.
- * To do so would be pointless given ULPRs, and just waste bandwidth. */
- public static final long COOLDOWN_PERIOD = 5*60*1000;
- /** The number of times a key can be requested before triggering the
cooldown period.
- * Note: If you don't want your requests to be subject to cooldown
(e.g. in fproxy), make
- * your max retry count less than this (and more than -1). */
- public static final int COOLDOWN_RETRIES = 3;
-
/** All pending gets by key. Used to automatically satisfy pending
requests when either the key is fetched by
* an overlapping request, or it is fetched by a request from another
node. Operations on this are synchronized on
* itself. */
Modified: trunk/freenet/src/freenet/node/RequestScheduler.java
===================================================================
--- trunk/freenet/src/freenet/node/RequestScheduler.java 2008-02-23
21:25:47 UTC (rev 18139)
+++ trunk/freenet/src/freenet/node/RequestScheduler.java 2008-02-23
21:26:28 UTC (rev 18140)
@@ -33,4 +33,12 @@
*/
public void moveKeysFromCooldownQueue();
+ /** Once a key has been requested a few times, don't request it again
for 30 minutes.
+ * To do so would be pointless given ULPRs, and just waste bandwidth. */
+ public static final long COOLDOWN_PERIOD = 5*60*1000;
+ /** The number of times a key can be requested before triggering the
cooldown period.
+ * Note: If you don't want your requests to be subject to cooldown
(e.g. in fproxy), make
+ * your max retry count less than this (and more than -1). */
+ public static final int COOLDOWN_RETRIES = 3;
+
}