Branch: Tag:

2013-09-12

2013-09-12 21:16:23 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Search.Queue: Added some AutoDoc.

2:      inherit .Base;    + //! @[Search] crawler state stored in a @[Mysql] database. +    string url, table;      protected Thread.Local _db = Thread.Local();
29:    return String.string2hex(md5->digest());   }    + //! @param _url + //! @[Sql.Sql] URL for the database to store the queue. + //! + //! @param _table + //! @[Sql.Sql] table name to store the queue in. + //! + //! If the table doesn't exist it will be created.   void create( Web.Crawler.Stats _stats,    Web.Crawler.Policy _policy,   
236:    return uris;   }    + //! @returns + //! Returns an array with all URI schemes currently used in the queue.   array(string) get_schemes()   {    // FIXME: Consider using SUBSTRING_INDEX().
317:    to_md5((string)uri));   }    + //! @returns + //! Returns the current stage for the specified URI. + //! + //! @seealso + //! @[set_stage()]   int get_stage( Standards.URI uri )   {    array a = db->query( "select stage from "+table+" where uri_md5=%s", to_md5((string)uri));
326:    return -1;   }    + //! Reset the stage to @expr{0@} (zero) for all URIs with the specified + //! @[uri_prefix]. If no @[uri_prefix] is specified reset the stage for + //! all URIs.   void reset_stage(string|void uri_prefix)   {    if (uri_prefix) {