Class BinManager
- java.lang.Object
-
- org.apache.manifoldcf.core.database.BaseTable
-
- org.apache.manifoldcf.crawler.bins.BinManager
-
- All Implemented Interfaces:
IBinManager
public class BinManager extends BaseTable implements IBinManager
This class manages the docbins table. A row in this table represents a document bin. The count that is kept is the number of documents in this particular bin that have been assigned a document priority.
docbinsField Type Description binname VARCHAR(255) Primary Key bincounter BIGINT
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String_rcsidstatic java.lang.StringbinCounterFieldstatic java.lang.StringbinNameFieldstatic java.lang.StringconnectorClassField-
Fields inherited from class org.apache.manifoldcf.core.database.BaseTable
dbInterface, tableName
-
-
Constructor Summary
Constructors Constructor Description BinManager(IDBInterface database)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddeinstall()Uninstall.double[]getIncrementBinValues(java.lang.String connectorClass, java.lang.String binName, double newBinValue, int count)Get N bin values (and set next one).double[]getIncrementBinValuesInTransaction(java.lang.String connectorClass, java.lang.String binName, double newBinValue, int count)Get N bin values (and set next one).voidinstall()Install or upgrade this table.voidreset()Reset all bins-
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
-
connectorClassField
public static final java.lang.String connectorClassField
- See Also:
- Constant Field Values
-
binNameField
public static final java.lang.String binNameField
- See Also:
- Constant Field Values
-
binCounterField
public static final java.lang.String binCounterField
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
BinManager
public BinManager(IDBInterface database) throws ManifoldCFException
Constructor.- Parameters:
database- is the database handle.- Throws:
ManifoldCFException
-
-
Method Detail
-
install
public void install() throws ManifoldCFExceptionInstall or upgrade this table.- Specified by:
installin interfaceIBinManager- Throws:
ManifoldCFException
-
deinstall
public void deinstall() throws ManifoldCFExceptionUninstall.- Specified by:
deinstallin interfaceIBinManager- Throws:
ManifoldCFException
-
reset
public void reset() throws ManifoldCFExceptionReset all bins- Specified by:
resetin interfaceIBinManager- Throws:
ManifoldCFException
-
getIncrementBinValues
public double[] getIncrementBinValues(java.lang.String connectorClass, java.lang.String binName, double newBinValue, int count) throws ManifoldCFExceptionGet N bin values (and set next one). If the record does not yet exist, create it with a starting value. We expect this to happen within a transaction!!.- Specified by:
getIncrementBinValuesin interfaceIBinManager- Parameters:
connectorClass- is the class name of the connectorbinName- is the name of the bin (256 char max)newBinValue- is the value to use if there is no such bin yet. This is the value that will be returned; what will be stored will be that value + 1.count- is the number of values desired.- Returns:
- the counter values.
- Throws:
ManifoldCFException
-
getIncrementBinValuesInTransaction
public double[] getIncrementBinValuesInTransaction(java.lang.String connectorClass, java.lang.String binName, double newBinValue, int count) throws ManifoldCFExceptionGet N bin values (and set next one). If the record does not yet exist, create it with a starting value. This method invokes its own retry-able transaction.- Specified by:
getIncrementBinValuesInTransactionin interfaceIBinManager- Parameters:
connectorClass- is the class name of the connectorbinName- is the name of the bin (256 char max)newBinValue- is the value to use if there is no such bin yet. This is the value that will be returned; what will be stored will be that value + 1.count- is the number of values desired.- Returns:
- the counter values.
- Throws:
ManifoldCFException
-
-