*/
abstract class BaseProducer extends BaseFrameworkSystem {
/**
- * Out-going work-queue
+ * Outgoing work-queue
*/
private $outgoingQueueInstance = null;
+ /**
+ * Incoming raw data/items queue
+ */
+ private $incomingQueueInstance = null;
+
/**
* Protected constructor
*
}
/**
- * Setter for out-going work queue
+ * Getter for outgoing work queue
*
- * @param $outgoingQueueInstance The out-going work queue instance
+ * @param $outgoingQueueInstance The outgoing work queue instance
+ */
+ protected final function getOutgoingQueueInstance () {
+ return $this->outgoingQueueInstance;
+ }
+
+ /**
+ * Setter for outgoing work queue
+ *
+ * @param $outgoingQueueInstance The outgoing work queue instance
* @return void
*/
private final function setOutgoingQueueInstance (Stackable $outgoingQueueInstance) {
}
/**
- * Getter for out-going work queue
+ * Getter for incoming raw data/items queue
*
- * @param $outgoingQueueInstance The out-going work queue instance
+ * @param $incomingQueueInstance The incoming raw data/items queue instance
*/
- protected final function getOutgoingQueueInstance () {
- return $this->outgoingQueueInstance;
+ protected final function getIncomingQueueInstance () {
+ return $this->incomingQueueInstance;
+ }
+
+ /**
+ * Setter for incoming raw data/items queue
+ *
+ * @param $incomingQueueInstance The incoming raw data/items queue instance
+ * @return void
+ */
+ private final function setIncomingQueueInstance (Stackable $incomingQueueInstance) {
+ $this->incomingQueueInstance = $incomingQueueInstance;
}
/**
abstract protected function initProducer();
/**
- * Initializes the work queue which is being used for out-going, produced
+ * Initializes the work queue which is being used for outgoing, produced
* items.
*
* @return void
*/
protected function initWorkQueue () {
// Get an instance and set it in this producer
- $this->setOutgoingQueueInstance(ObjectFactory::createObjectByConfiguredName('producer_outgoing_work_queue'));
+ $this->setOutgoingQueueInstance(ObjectFactory::createObjectByConfiguredName('producer_outgoing_queue'));
+
+ // Init the queue
+ $this->getOutgoingQueueInstance()->initStacker('outgoing_queue');
+
+ // Get an instance and set it in this producer
+ $this->setOutgoingQueueInstance(ObjectFactory::createObjectByConfiguredName('producer_incoming_queue'));
// Init the queue
- $this->getOutgoingQueueInstance()->initStacker('work_queue');
+ $this->getOutgoingQueueInstance()->initStacker('incoming_queue');
// Debug message
- $this->debugOutput('PRODUCER: Out-going work queue initialized.');
+ $this->debugOutput('PRODUCER: All queues have been initialized.');
}
}