r26643 - in trunk/freenet: src/freenet/clients/http src/freenet/support test/freenet/support

[email protected]
Newsgroups gmane.network.freenet.cvs
Message-ID <[email protected]>
Author: j16sdiz
Date: 2009-04-08 05:29:13 +0000 (Wed, 08 Apr 2009)
New Revision: 26643

Modified:
   trunk/freenet/src/freenet/clients/http/StatisticsToadlet.java
   trunk/freenet/src/freenet/support/PrioritizedSerialExecutor.java
   trunk/freenet/test/freenet/support/PrioritizedSerialExecutorTest.java
Log:
Rename method runningJobs() -> queuedJobs()

Modified: trunk/freenet/src/freenet/clients/http/StatisticsToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/StatisticsToadlet.java	2009-04-08 05:22:36 UTC (rev 26642)
+++ trunk/freenet/src/freenet/clients/http/StatisticsToadlet.java	2009-04-08 05:29:13 UTC (rev 26643)
@@ -438,7 +438,7 @@
 	private void drawDatabaseJobsBox(HTMLNode node) {
 		node.addChild("div", "class", "infobox-header", l10n("databaseJobsByPriority"));
 		HTMLNode threadsInfoboxContent = node.addChild("div", "class", "infobox-content");
-		int[] jobsByPriority = core.clientDatabaseExecutor.runningJobs();
+		int[] jobsByPriority = core.clientDatabaseExecutor.queuedJobs();
 		
 		HTMLNode threadsByPriorityTable = threadsInfoboxContent.addChild("table", "border", "0");
 		HTMLNode row = threadsByPriorityTable.addChild("tr");

Modified: trunk/freenet/src/freenet/support/PrioritizedSerialExecutor.java
===================================================================
--- trunk/freenet/src/freenet/support/PrioritizedSerialExecutor.java	2009-04-08 05:22:36 UTC (rev 26642)
+++ trunk/freenet/src/freenet/support/PrioritizedSerialExecutor.java	2009-04-08 05:29:13 UTC (rev 26643)
@@ -257,7 +257,7 @@
 		}
 	}
 
-	public int[] runningJobs() {
+	public int[] queuedJobs() {
 		int[] retval;
 		synchronized(jobs) {
 			retval = jobCount.clone();

Modified: trunk/freenet/test/freenet/support/PrioritizedSerialExecutorTest.java
===================================================================
--- trunk/freenet/test/freenet/support/PrioritizedSerialExecutorTest.java	2009-04-08 05:22:36 UTC (rev 26642)
+++ trunk/freenet/test/freenet/support/PrioritizedSerialExecutorTest.java	2009-04-08 05:29:13 UTC (rev 26643)
@@ -133,9 +133,9 @@
 		assertEquals(0, exec.getQueueSize(1));
 		assertEquals(1, exec.getQueueSize(0));
 
-		assertTrue( // Two Possibility: JP may be running already. runningJobs() is queued jobs, not really "running"
-			Arrays.equals(new int[] { 1, 0, 2, 0, 1, 0, 0, 0, 0, 0 }, exec.runningJobs()) ||
-			Arrays.equals(new int[] { 1, 0, 2, 1, 1, 0, 0, 0, 0, 0 }, exec.runningJobs())
+		assertTrue(
+			Arrays.equals(new int[] { 1, 0, 2, 0, 1, 0, 0, 0, 0, 0 }, exec.queuedJobs()) ||
+			Arrays.equals(new int[] { 1, 0, 2, 1, 1, 0, 0, 0, 0, 0 }, exec.queuedJobs())
 		);
 
 		waitFor(5); // JP, JQ, J2, JO, JR
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.