Yioop_V9.5_Source_Code_Documentation

Notifier

A Notifier is an object which will be notified by a priority queue when the index in the queue viewed as array of some data item has been changed.

A Notifier is notified when the index in the queue viewed as array of some data item has been changed, this gives the Notifier object the ability to update its value of the index for that data item. As an example, in a search engine, if a priority queue is used and implements Notifier, storing url together with their weights and allow one to get out the url of highest weight. This is implemented by storing in a PriorityQueue keys consisting of hashes of urls (as fixed length) and values consisting of the weight. Then in a web archive the url and its index in the priority queue is stored. When the index in the queue changes, the priority queue's notify method is called to adjust the index that is stored in the web archive. Priority queues are the old way Yioop implemented crawling. It now uses a faster file folder implementation @see CrawlQueueBundle

Tags
author

Chris Pollett

Table of Contents

notify()  : mixed
Handles the update of the index of a data item in a queue with respect to the Notifier object.

Methods

notify()

Handles the update of the index of a data item in a queue with respect to the Notifier object.

public notify(int $index, mixed $data) : mixed
Parameters
$index : int

the index of a row in a heap-based priority queue

$data : mixed

the data that is stored at that index

Return values
mixed

        

Search results