Class HopFilterManager
- java.lang.Object
-
- org.apache.manifoldcf.core.database.BaseTable
-
- org.apache.manifoldcf.crawler.jobs.HopFilterManager
-
public class HopFilterManager extends BaseTable
This class manages the "hopfilters" table, which contains the hopcount filters for each job. It's separated from the main jobs table because we will need multiple hop filters per job.
jobhopfiltersField Type Description ownerid BIGINT Reference:jobs.id linktype VARCHAR(255) maxhops BIGINT
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String_rcsidstatic java.lang.StringlinkTypeFieldstatic java.lang.StringmaxHopsFieldstatic java.lang.StringownerIDField-
Fields inherited from class org.apache.manifoldcf.core.database.BaseTable
dbInterface, tableName
-
-
Constructor Summary
Constructors Constructor Description HopFilterManager(IThreadContext threadContext, IDBInterface database)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancompareRows(java.lang.Long ownerID, IJobDescription list)Compare a filter list against what's in a job description.voiddeinstall()Uninstall.voiddeleteRows(java.lang.Long ownerID)Delete rows.voidgetRows(java.util.Map<java.lang.Long,JobDescription> returnValues, java.lang.String ownerIDList, java.util.ArrayList ownerIDParams)Fill in a set of filters corresponding to a set of owner id's.voidinstall(java.lang.String ownerTable, java.lang.String owningTablePrimaryKey)Install or upgrade.java.util.MapreadRows(java.lang.Long id)Read rows for a given owner id.voidwriteRows(java.lang.Long ownerID, IJobDescription list)Write a filter list into the database.-
Methods inherited from class org.apache.manifoldcf.core.database.BaseTable
addTableIndex, analyzeTable, beginTransaction, buildConjunctionClause, constructCountClause, constructDistinctOnClause, constructDoubleCastClause, constructOffsetLimitClause, constructRegexpClause, constructSubstringClause, endTransaction, findConjunctionClauseMax, getDatabaseCacheKey, getDBInterface, getMaxInClause, getMaxOrClause, getSleepAmt, getTableIndexes, getTableName, getTableSchema, getTransactionID, getWindowedReportMaxRows, makeTableKey, noteModifications, performAddIndex, performAlter, performCommit, performCreate, performDelete, performDrop, performInsert, performModification, performQuery, performQuery, performRemoveIndex, performUpdate, prepareRowForSave, readRow, reindexTable, signalRollback, sleepFor
-
-
-
-
Field Detail
-
_rcsid
public static final java.lang.String _rcsid
- See Also:
- Constant Field Values
-
ownerIDField
public static final java.lang.String ownerIDField
- See Also:
- Constant Field Values
-
linkTypeField
public static final java.lang.String linkTypeField
- See Also:
- Constant Field Values
-
maxHopsField
public static final java.lang.String maxHopsField
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
HopFilterManager
public HopFilterManager(IThreadContext threadContext, IDBInterface database) throws ManifoldCFException
Constructor.- Parameters:
threadContext- is the thread context.database- is the database instance.- Throws:
ManifoldCFException
-
-
Method Detail
-
install
public void install(java.lang.String ownerTable, java.lang.String owningTablePrimaryKey) throws ManifoldCFExceptionInstall or upgrade.- Parameters:
ownerTable- is the name of the table that owns this one.owningTablePrimaryKey- is the primary key of the owning table.- Throws:
ManifoldCFException
-
deinstall
public void deinstall() throws ManifoldCFExceptionUninstall.- Throws:
ManifoldCFException
-
readRows
public java.util.Map readRows(java.lang.Long id) throws ManifoldCFExceptionRead rows for a given owner id.- Parameters:
id- is the owner id.- Returns:
- a map of link type to max hop count (as a Long).
- Throws:
ManifoldCFException
-
getRows
public void getRows(java.util.Map<java.lang.Long,JobDescription> returnValues, java.lang.String ownerIDList, java.util.ArrayList ownerIDParams) throws ManifoldCFException
Fill in a set of filters corresponding to a set of owner id's.- Parameters:
returnValues- is a map keyed by ownerID, with value of JobDescription.ownerIDList- is the list of owner id's.ownerIDParams- is the corresponding set of owner id parameters.- Throws:
ManifoldCFException
-
compareRows
public boolean compareRows(java.lang.Long ownerID, IJobDescription list) throws ManifoldCFExceptionCompare a filter list against what's in a job description.- Parameters:
ownerID- is the owning identifier.list- is the job description to write hopcount filters for.- Throws:
ManifoldCFException
-
writeRows
public void writeRows(java.lang.Long ownerID, IJobDescription list) throws ManifoldCFExceptionWrite a filter list into the database.- Parameters:
ownerID- is the owning identifier.list- is the job description to write hopcount filters for.- Throws:
ManifoldCFException
-
deleteRows
public void deleteRows(java.lang.Long ownerID) throws ManifoldCFExceptionDelete rows.- Parameters:
ownerID- is the owner whose rows to delete.- Throws:
ManifoldCFException
-
-