|
Enterprise Information Portal APIs |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.gcs.db.component.DB2Pool | +--com.ibm.gcs.db.component.DB2Queue | +--com.ibm.gcs.db.component.DB2RevisitQueue
DB2RevisitQueue represents the URLs in the database which must be recrawled. It represents all DB2 URL records that satisfy the SQL query
SELECT * FROM urlcrawltable WHERE hide=0 AND (state_id=1 OR (visit_time < theTime AND (state_id>3)) OR (state_id=2 AND time < theTime)) ORDER BY depth, state_id, time
The method setOrderBy
may be used to specify a different column for the ORDER BY clause.
The constructor creates the SQL SELECT and SQL SELECT COUNT(*) statements by calling the following methods
buildSQLSelect()
buildSQLCount()
getSQLPredicate()
and getSQLOrderBy()
to build the statements. Extending classes may override getSQLPredicate()
and getSQLOrderBy()
to refine the properties of the queue.
For example, DB2PriorityQueue overrides getSQLPredicate
and append the
" AND priority=p
" to the predicate.
These classes also override insert()
, and contains()
to reflect the changes.
Fields inherited from class com.ibm.gcs.db.component.DB2Pool |
debug |
Constructor Summary | |
DB2RevisitQueue()
Constructor. |
|
DB2RevisitQueue(java.sql.Timestamp visitedBefore)
Constructor. |
Method Summary | |
boolean |
contains(DB2URLContainer urlC,
Transaction t)
Checks to see if the specified URL is a member of this queue. |
static void |
main(java.lang.String[] args)
Simple test. |
Methods inherited from class com.ibm.gcs.db.component.DB2Queue |
getSQLCount, getSQLSelect, insert, setOrderBy |
Methods inherited from class com.ibm.gcs.db.component.DB2Pool |
getURLContainers, num, toString |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DB2RevisitQueue(java.sql.Timestamp visitedBefore)
Sets order by column to default order and calls
buildSQLSelect()
and buildSQLCount()
to build the SQL statements.
visitedBefore
- Revisit if visited before this time.public DB2RevisitQueue()
Sets order by column to default order and calls
buildSQLSelect()
and buildSQLCount()
to build the SQL statements.
Method Detail |
public boolean contains(DB2URLContainer urlC, Transaction t) throws TransactionException
A URL is a member of this queue if it matches the SQL predicate.
contains
in class DB2Queue
urlC
- The DB2URLContainer to check.t
- The transaction object for DB2 access.TransactionException
- on failed SQL
execution.public static void main(java.lang.String[] args)
DB2Queue
|
EIP Web Crawler APIs | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |