+
+ /**
+ * Inits the out-going queue stack
+ *
+ * @return void
+ */
+ protected function initOutgoingQueue () {
+ $this->getOutgoingQueueInstance()->initStacker('outgoing_queue', true);
+ }
+
+ /**
+ * Adds an entry to the out-going work queue
+ *
+ * @param $value The value to be added to the out-going work queue
+ * @return void
+ */
+ protected function addValueToOutgoingQueue ($value) {
+ $this->getOutgoingQueueInstance()->pushNamed('outgoing_queue', $value);
+ }
+
+ /**
+ * Checks wether a configurable out-going queue limit has been reached
+ *
+ * @param $configEntry Configuration entry where the limit is stored
+ * @return $isReached Wether the limit is reached
+ */
+ protected function isOutgoingQueueLimitReached($configEntry) {
+ return ($this->getConfigInstance()->getConfigEntry($configEntry) <= $this->getOutgoingQueueInstance()->getStackCount('outgoing_queue'));
+ }
+
+ /**
+ * Inits the incoming queue stack
+ *
+ * @return void
+ */
+ protected function initIncomingQueue () {
+ $this->getIncomingQueueInstance()->initStacker('incoming_queue', true);
+ }
+
+ /**
+ * Adds an entry to the incoming work queue
+ *
+ * @param $value The value to be added to the incoming work queue
+ * @return void
+ */
+ protected function addValueToIncomingQueue ($value) {
+ $this->getIncomingQueueInstance()->pushNamed('incoming_queue', $value);
+ }
+
+ /**
+ * Checks wether a configurable incoming queue limit has been reached
+ *
+ * @param $configEntry Configuration entry where the limit is stored
+ * @return $isReached Wether the limit is reached
+ */
+ protected function isIncomingQueueLimitReached($configEntry) {
+ return ($this->getConfigInstance()->getConfigEntry($configEntry) <= $this->getIncomingQueueInstance()->getStackCount('incoming_queue'));
+ }