]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/dht/class_BaseDht.php
Continued:
[hub.git] / application / hub / main / dht / class_BaseDht.php
index 4dda72d23c46c25fe4ef8495b120440eedc576ee..490875a36e995e5cb29f031c343ab2a8f00f32c5 100644 (file)
@@ -44,10 +44,10 @@ abstract class BaseDht extends BaseHubSystem implements Distributable {
                parent::__construct($className);
 
                // Get a stacker instance for this DHT
-               $stackerInstance = ObjectFactory::createObjectByConfiguredName('dht_stacker_class');
+               $stackInstance = ObjectFactory::createObjectByConfiguredName('dht_stacker_class');
 
                // Set it in this class
-               $this->setStackerInstance($stackerInstance);
+               $this->setStackInstance($stackInstance);
 
                // Init all stackers
                $this->initStacks();
@@ -63,7 +63,7 @@ abstract class BaseDht extends BaseHubSystem implements Distributable {
         */
        private function initStacks () {
                // Initialize all stacker
-               $this->getStackerInstance()->initStacks(array(
+               $this->getStackInstance()->initStacks(array(
                        self::STACKER_NAME_INSERT_NODE,
                        self::STACKER_NAME_PENDING_PUBLISHING,
                ));
@@ -97,7 +97,7 @@ abstract class BaseDht extends BaseHubSystem implements Distributable {
         */
        public function ifInsertNodeDataPending () {
                // Determine it if it is not empty
-               $isPending = ($this->getStackerInstance()->isStackEmpty(self::STACKER_NAME_INSERT_NODE) === FALSE);
+               $isPending = ($this->getStackInstance()->isStackEmpty(self::STACKER_NAME_INSERT_NODE) === FALSE);
 
                // Return status
                return $isPending;
@@ -110,7 +110,7 @@ abstract class BaseDht extends BaseHubSystem implements Distributable {
         */
        public function insertSingleNodeData () {
                // Get next node data from stack
-               $nodeData = $this->getStackerInstance()->popNamed(self::STACKER_NAME_INSERT_NODE);
+               $nodeData = $this->getStackInstance()->popNamed(self::STACKER_NAME_INSERT_NODE);
 
                // Make sure $nodeData is really an array and has at least one entry
                assert((is_array($nodeData)) && (count($nodeData) > 0));
@@ -162,7 +162,7 @@ abstract class BaseDht extends BaseHubSystem implements Distributable {
 
                        // ... and push it to the next stack
                        //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('BASE-DHT[' . __METHOD__ . ':' . __LINE__ . '] Pushing entry with ' . count($current) . ' elements to stack ' . self::STACKER_NAME_PENDING_PUBLISHING . ' ...');
-                       $this->getStackerInstance()->pushNamed(self::STACKER_NAME_PENDING_PUBLISHING, $current);
+                       $this->getStackInstance()->pushNamed(self::STACKER_NAME_PENDING_PUBLISHING, $current);
                } // END - while
        }
 
@@ -173,7 +173,7 @@ abstract class BaseDht extends BaseHubSystem implements Distributable {
         */
        public function hasEntriesPendingPublication () {
                // Determine it if it is not empty
-               $isPending = ($this->getStackerInstance()->isStackEmpty(self::STACKER_NAME_PENDING_PUBLISHING) === FALSE);
+               $isPending = ($this->getStackInstance()->isStackEmpty(self::STACKER_NAME_PENDING_PUBLISHING) === FALSE);
 
                // Return status
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('BASE-DHT[' . __METHOD__ . ':' . __LINE__ . '] isPending=' . intval($isPending));
@@ -215,7 +215,7 @@ abstract class BaseDht extends BaseHubSystem implements Distributable {
                $this->publishHelperInstance->loadDescriptorXml($this);
 
                // "Pop" next entry
-               $entry = $this->getStackerInstance()->popNamed(self::STACKER_NAME_PENDING_PUBLISHING);
+               $entry = $this->getStackInstance()->popNamed(self::STACKER_NAME_PENDING_PUBLISHING);
 
                // Some sanity-checks
                assert(is_array($entry));