return $this->totalEntries;
}
+ /**
+ * Setter for total entries
+ *
+ * @param $totalEntries Total entries in this stack
+ * @return void
+ */
+ private final function setCounter ($counter) {
+ // Set it
+ $this->totalEntries = $counter;
+ }
+
/**
* Increment counter
*
* Initializes this file-based stack.
*
* @param $fileName File name of this stack
+ * @param $type Type of this stack (e.g. url_source for URL sources)
* @return void
*/
- protected function initFileStack ($fileName) {
+ protected function initFileStack ($fileName, $type) {
// Get a file i/o pointer instance for stack file
$pointerInstance = ObjectFactory::createObjectByConfiguredName('file_raw_input_output_class', array($fileName));
* Get stack index instance. This can be used for faster
* "defragmentation" and startup.
*/
- $indexInstance = FileStackIndexFactory::createFileStackIndex($fileName);
+ $indexInstance = FileStackIndexFactory::createFileStackIndexInstance($fileName, $type);
// And set it here
$this->setIndexInstance($indexInstance);