Author: toad
Date: 2008-06-21 16:14:37 +0000 (Sat, 21 Jun 2008)
New Revision: 20585
Modified:
branches/db4o/freenet/src/freenet/client/FECQueue.java
Log:
Clarify
Modified: branches/db4o/freenet/src/freenet/client/FECQueue.java
===================================================================
--- branches/db4o/freenet/src/freenet/client/FECQueue.java 2008-06-21
16:13:57 UTC (rev 20584)
+++ branches/db4o/freenet/src/freenet/client/FECQueue.java 2008-06-21
16:14:37 UTC (rev 20585)
@@ -193,17 +193,17 @@
while(true) {
boolean addedAny = false;
int totalCached = 0;
- for(short i=0;i<priorities;i++) {
+ for(short prio=0;prio<priorities;prio++) {
int grab = 0;
synchronized(FECQueue.this) {
- int newCached = totalCached +
persistentQueueCache[i].size();
+ int newCached = totalCached +
persistentQueueCache[prio].size();
if(newCached >=
maxPersistentQueueCacheSize) return;
grab =
maxPersistentQueueCacheSize - newCached;
}
if(logMINOR) Logger.minor(this,
"Grabbing up to "+grab+" jobs");
Query query = container.query();
query.constrain(FECJob.class);
- query.descend("priority").constrain(new
Short(i));
+ query.descend("priority").constrain(new
Short(prio));
query.descend("queue").constrain(FECQueue.this);
query.descend("addedTime").orderAscending();
ObjectSet results = query.execute();
@@ -212,7 +212,7 @@
FECJob job = (FECJob)
results.next();
if(logMINOR)
Logger.minor(this, "Maybe adding "+job);
synchronized(FECQueue.this) {
-
if(persistentQueueCache[i].contains(job)) {
+
if(persistentQueueCache[prio].contains(job)) {
j--;
continue;
}