application/hub/interfaces/.htaccess -text svneol=unset#text/plain
application/hub/interfaces/connectors/.htaccess -text svneol=unset#text/plain
application/hub/interfaces/connectors/class_Connectable.php -text svneol=unset#text/plain
+application/hub/interfaces/consumer/.htaccess svneol=native#text/plain
+application/hub/interfaces/consumer/class_Consumer.php svneol=native#text/plain
application/hub/interfaces/cruncher/.htaccess svneol=native#text/plain
application/hub/interfaces/cruncher/class_CruncherHelper.php svneol=native#text/plain
application/hub/interfaces/discovery/.htaccess -text svneol=unset#text/plain
application/hub/interfaces/pool/listener/class_PoolableListener.php -text svneol=unset#text/plain
application/hub/interfaces/pool/peer/.htaccess -text svneol=unset#text/plain
application/hub/interfaces/pool/peer/class_PoolablePeer.php -text svneol=unset#text/plain
+application/hub/interfaces/producer/.htaccess svneol=native#text/plain
+application/hub/interfaces/producer/class_Producer.php svneol=native#text/plain
+application/hub/interfaces/producer/work_units/.htaccess svneol=native#text/plain
+application/hub/interfaces/producer/work_units/class_UnitProducer.php svneol=native#text/plain
application/hub/interfaces/protocol/.htaccess -text svneol=unset#text/plain
application/hub/interfaces/protocol/class_ProtocolHandler.php svneol=native#text/plain
application/hub/interfaces/query/.htaccess -text svneol=unset#text/plain
application/hub/main/pools/listener/class_DefaultListenerPool.php -text svneol=unset#text/plain
application/hub/main/pools/peer/.htaccess -text svneol=unset#text/plain
application/hub/main/pools/peer/class_DefaultPeerPool.php -text svneol=unset#text/plain
+application/hub/main/producer/.htaccess svneol=native#text/plain
+application/hub/main/producer/class_ -text
+application/hub/main/producer/class_BaseProducer.php svneol=native#text/plain
+application/hub/main/producer/cruncher/.htaccess svneol=native#text/plain
+application/hub/main/producer/cruncher/work_units/.htaccess svneol=native#text/plain
+application/hub/main/producer/cruncher/work_units/class_CruncherTestUnitProducer.php svneol=native#text/plain
application/hub/main/queries/.htaccess -text svneol=unset#text/plain
application/hub/main/queries/class_ -text svneol=unset#text/plain
application/hub/main/queries/class_BaseQuery.php -text svneol=unset#text/plain
// CFG: CRUNCHER-MAX-TEST-UNIT-AMOUNT
$cfg->setConfigEntry('cruncher_max_text_unit_amount', 10);
+// CFG: CRUNCHER-TEST-UNIT-PRODUCER-CLASS
+$cfg->setConfigEntry('cruncher_test_unit_producer_class', 'CruncherTestUnitProducer');
+
// [EOF]
?>
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * An interface for the producer/consumer implementation
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+interface Consumer extends FrameworkInterface {
+}
+
+// [EOF]
+?>
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * An interface for the producer/consumer implementation
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+interface Producer extends FrameworkInterface {
+}
+
+// [EOF]
+?>
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * An interface for the producer/consumer implementation, especially for work/
+ * test unit producers.
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+interface UnitProducer extends Producer {
+ /**
+ * Produces some work/test units and pushes them onto the queue
+ *
+ * @return void
+ */
+ function produceUnits ();
+}
+
+// [EOF]
+?>
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A ??? producer class
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class ???Producer extends BaseFrameworkSystem implements Producer, Registerable {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * Creates an instance of this class
+ *
+ * @return $producerInstance An instance of a Producer class
+ */
+ public final static function create???Producer () {
+ // Get new instance
+ $producerInstance = new ???Producer();
+
+ // Return the prepared instance
+ return $producerInstance;
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+<?php
+/**
+ * A general Producer class
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class BaseProducer extends BaseFrameworkSystem {
+ /**
+ * Protected constructor
+ *
+ * @param $className Name of the class
+ * @return void
+ */
+ protected function __construct ($className) {
+ // Call parent constructor
+ parent::__construct($className);
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+Deny from all
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A CruncherTestUnit producer class
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class CruncherTestUnitProducer extends BaseFrameworkSystem implements UnitProducer, Registerable {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * Creates an instance of this class
+ *
+ * @return $producerInstance An instance of a Producer class
+ */
+ public final static function createCruncherTestUnitProducer () {
+ // Get new instance
+ $producerInstance = new CruncherTestUnitProducer();
+
+ // Return the prepared instance
+ return $producerInstance;
+ }
+
+ /**
+ * Produces some work/test units and pushes them onto the queue
+ *
+ * @return void
+ * @todo 0% done
+ */
+ public function produceUnits () {
+ $this->partialStub('Please implement this method.');
+ }
+}
+
+// [EOF]
+?>
* @todo 0%
*/
public function executeTask () {
- $this->partialStub('Unimplemented task.');
+ // First we check if we already have an instance (which will happen at any later cyclus)
+ if (!Registry::getRegistry()->instanceExists('test_unit_producer')) {
+ // No instance found, so we need to create a producer instance
+ $producerInstance = ObjectFactory::createObjectByConfiguredName('cruncher_test_unit_producer_class');
+
+ // ... and add it to the registry
+ Registry::getRegistry()->addInstance('test_unit_producer', $producerInstance);
+ } else {
+ // Get the producer instance from registry
+ $producerInstance = Registry::getRegistry()->getInstance('test_unit_producer');
+ }
+
+ // We can now use that producer instance for generating some test units
+ $producerInstance->produceUnits();
}
}
<?php
/**
- * A WorkUnitFetcher task for crunchers
+ * A WorkUnitFetcher task for crunchers which asks the cruncher to fetch work
+ * units or, if enabled in configuration, work on some test units.
*
* @author Roland Haeder <webmaster@ship-simu.org>
* @version 0.0.0
./application/hub/main/cruncher/mcrypt/class_HubMcryptCruncher.php:98: * @todo Implement this method
./application/hub/main/discovery/socket/class_PackageSocketDiscovery.php:102: // @TODO We may need some locking here
./application/hub/main/factories/socket/class_SocketFactory.php:10: * @todo Find an interface for hub helper
-./application/hub/main/filter/activation/node/class_NodeActivationSelfAnnouncementFilter.php:54: * @todo 0% done
./application/hub/main/filter/bootstrap/cruncher/class_CruncherBootstrapBufferQueueInitializerFilter.php:54: * @todo 0% done
./application/hub/main/filter/bootstrap/cruncher/class_CruncherBootstrapGenericActivationFilter.php:54: * @todo Maybe we want to do somthing more here?
./application/hub/main/filter/cruncher/class_CruncherInitializationFilter.php:54: * @todo 0% done
./application/hub/main/filter/shutdown/node/class_NodeShutdownFlushNodeListFilter.php:55: * @todo 0% done
./application/hub/main/filter/shutdown/node/class_NodeShutdownTaskHandlerFilter.php:55: * @todo 0% done
./application/hub/main/filter/task/cruncher/class_CruncherTaskHandlerInitializerFilter.php:55: * @todo 5% done
-./application/hub/main/filter/task/node/class_NodeTaskHandlerInitializerFilter.php:55: * @todo 0% done
+./application/hub/main/filter/task/node/class_NodeTaskHandlerInitializerFilter.php:55: * @todo Maybe some more tasks needs to be added?
./application/hub/main/handler/network/tcp/class_TcpNetworkPackageHandler.php:96: * @todo ~10% done
./application/hub/main/handler/network/udp/class_UdpNetworkPackageHandler.php:58: * @todo 0%
./application/hub/main/handler/tasks/class_TaskHandler.php:140: // @TODO Messurement can be added around this call
./application/hub/main/package/class_NetworkPackage.php:383: // @TODO Add some logging here
./application/hub/main/package/class_NetworkPackage.php:409: // @TODO Add some logging here
./application/hub/main/pools/peer/class_DefaultPeerPool.php:148: // @TODO Check for IP
+./application/hub/main/producer/cruncher/work_units/class_CruncherTestUnitProducer.php:52: * @todo 0% done
./application/hub/main/resolver/state/network/class_NetworkStateResolver.php:68: * @todo ~30% done
./application/hub/main/resolver/state/network/class_NetworkStateResolver.php:80: // @TODO On some systems it is 134, on some 107?
-./application/hub/main/tasks/cruncher/class_CruncherWorkUnitFetcherTask.php:53: * @todo Maybe visit some sub-objects
+./application/hub/main/tasks/cruncher/class_CruncherTestUnitProducerTask.php:53: * @todo Maybe visit some sub-objects
+./application/hub/main/tasks/cruncher/class_CruncherTestUnitProducerTask.php:64: * @todo 0%
+./application/hub/main/tasks/cruncher/class_CruncherWorkUnitFetcherTask.php:54: * @todo Maybe visit some sub-objects
./application/hub/main/tasks/hub/announcement/class_HubSelfAnnouncementTask.php:53: * @todo 0%
./application/hub/main/tasks/hub/class_HubSelfConnectTask.php:53: * @todo 0%
-./application/hub/main/tasks/hub/ping/class_HubPingTask.php:63: * @todo 0%
+./application/hub/main/tasks/hub/ping/class_HubPingTask.php:73: * @todo 0% done
./application/hub/main/tasks/hub/update/class_HubUpdateCheckTask.php:53: * @todo 0%
./application/hub/main/template/announcement/class_XmlAnnouncementTemplateEngine.php:10: * @todo This template engine does not make use of setTemplateType()
./application/hub/main/template/announcement/class_XmlAnnouncementTemplateEngine.php:245: * @todo Find something useful with this!
# developers with SVN write-access
if ! test -e "index.php"; then
- echo "$0: Please execute this script from root directory."
- exit 1
+ echo "$0: Please execute this script from root directory."
+ exit 1
fi
echo "$0: Generating TODOs.txt..."