]> git.mxchange.org Git - hub.git/blobdiff - application/hub/interfaces/cruncher/class_CruncherHelper.php
Updated domain without a dash :(
[hub.git] / application / hub / interfaces / cruncher / class_CruncherHelper.php
index e95431a29a5f3d4b5dffb0c961538dbcc93f5e0f..4d069f6fb5fd95d8894e6646618b52f4298f6753 100644 (file)
@@ -2,11 +2,11 @@
 /**
  * An interface for "node-helper" classes
  *
- * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team
+ * @copyright  Copyright (c) 2011 - 2012 Cruncher Developer Team
  * @license            GNU GPL 3.0 or any newer version
- * @link               http://www.ship-simu.org
+ * @link               http://www.shipsimu.org
  * @todo               We need to find a better name for this interface
  *
  * This program is free software: you can redistribute it and/or modify
@@ -24,7 +24,7 @@
  */
 interface CruncherHelper extends FrameworkInterface {
        /**
-        * Method to "bootstrap" the node. This step does also apply provided
+        * Method to "bootstrap" the cruncher. This step does also apply provided
         * command-line arguments stored in the request instance. You should now
         * get it from calling $this->getRequestInstance().
         *
@@ -32,6 +32,15 @@ interface CruncherHelper extends FrameworkInterface {
         */
        function doBootstrapping ();
 
+       /**
+        * This method determines if the in-buffer is going to depleted and if so,
+        * it fetches more WUs from the network. If no WU can be fetched from the
+        * network and if enabled, a random test WU is being generated.
+        *
+        * @return      void
+        */
+       function doFetchWorkUnits ();
+
        /**
         * Outputs the console teaser. This should only be executed on startup or
         * full restarts. This method generates some space around the teaser.
@@ -43,9 +52,33 @@ interface CruncherHelper extends FrameworkInterface {
        /**
         * Add some cruncher-specific filters
         *
+        * @param       $controllerInstance             An object of a Controller instance
+        * @param       $responseInstance               An object of a Responseable instance
+        * @return      void
+        */
+       function addExtraFilters (Controller $controllerInstance, Responseable $responseInstance);
+
+       /**
+        * Enables/disables the cruncher (just sets a flag)
+        *
+        * @param       $version        Version number of this cruncher
+        * @return      void
+        */
+       function enableIsActive ($isActive = TRUE);
+
+       /**
+        * Determines whether the cruncher is active
+        *
+        * @return      $isActive       Whether the cruncher is active
+        */
+       function isActive ();
+
+       /**
+        * Initializes all buffer queues (mostly in/out)
+        *
         * @return      void
         */
-       function addExtraHubFilters ();
+       function initBufferQueues ();
 }
 
 // [EOF]