[or-cvs] r15689: Make it explicit that TestExecutor must be a Singleton. Than (in puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi: . impl)
sebastian at seul.org
sebastian at seul.org
Sun Jul 6 12:55:22 UTC 2008
Author: sebastian
Date: 2008-07-06 08:55:22 -0400 (Sun, 06 Jul 2008)
New Revision: 15689
Modified:
puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/AbstractMasterFactory.java
puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/TestExecutor.java
puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/impl/MasterImpl.java
puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/impl/MasterImplFactory.java
Log:
Make it explicit that TestExecutor must be a Singleton. Thanks karsten
Modified: puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/AbstractMasterFactory.java
===================================================================
--- puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/AbstractMasterFactory.java 2008-07-06 12:48:37 UTC (rev 15688)
+++ puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/AbstractMasterFactory.java 2008-07-06 12:55:22 UTC (rev 15689)
@@ -81,7 +81,7 @@
/**
* Override this to create a subclass of <code>TestExecutor</code>.
*
- * @return The new <code>TestExecutor</code> instance.
+ * @return The <code>TestExecutor</code> instance.
*/
- public abstract TestExecutor createTestExecutor();
+ public abstract TestExecutor getTestExecutorInstance();
}
Modified: puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/TestExecutor.java
===================================================================
--- puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/TestExecutor.java 2008-07-06 12:48:37 UTC (rev 15688)
+++ puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/TestExecutor.java 2008-07-06 12:55:22 UTC (rev 15689)
@@ -35,11 +35,12 @@
import java.util.concurrent.ConcurrentMap;
/**
- * A master uses a <code>TestExecutor</code> to load all registered tests and
- * check whether the currently running PuppeTor network can satisfy the
- * precondition necessary to run the test. If yes, it sets up the testing
+ * A master uses the <code>TestExecutor</code> instance to load all registered
+ * tests and check whether the currently running PuppeTor network can satisfy
+ * the precondition necessary to run the test. If yes, it sets up the testing
* environment and passes <code>PuppeTorJob</code>s to the slaves as the test
- * instructs it to do.
+ * instructs it to do. There must be only a single instance of
+ * <code>TestExecutor</code> at any time.
*
* @author Sebastian Hahn
*/
Modified: puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/impl/MasterImpl.java
===================================================================
--- puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/impl/MasterImpl.java 2008-07-06 12:48:37 UTC (rev 15688)
+++ puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/impl/MasterImpl.java 2008-07-06 12:55:22 UTC (rev 15689)
@@ -67,7 +67,7 @@
}
public void registerWithTestExecutor() {
- AbstractMasterFactory.getInstance().createTestExecutor()
+ AbstractMasterFactory.getInstance().getTestExecutorInstance()
.registerLocalMaster(this);
}
@@ -105,7 +105,7 @@
* do that when there are the queues that I mentioned.-SH
*/
public void unreferenced() {
- AbstractMasterFactory.getInstance().createTestExecutor()
+ AbstractMasterFactory.getInstance().getTestExecutorInstance()
.unregisterLocalMaster(this);
}
}
Modified: puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/impl/MasterImplFactory.java
===================================================================
--- puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/impl/MasterImplFactory.java 2008-07-06 12:48:37 UTC (rev 15688)
+++ puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/impl/MasterImplFactory.java 2008-07-06 12:55:22 UTC (rev 15689)
@@ -51,7 +51,7 @@
}
@Override
- public TestExecutor createTestExecutor() {
+ public TestExecutor getTestExecutorInstance() {
return TestExecutorImpl.getInstance();
}
}
More information about the tor-commits
mailing list