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
_rcsid
static java.lang.String
binCounterField
static java.lang.String
binNameField
static java.lang.String
connectorClassField
-
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 void
deinstall()
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).void
install()
Install or upgrade this table.void
reset()
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 ManifoldCFException
Install or upgrade this table.- Specified by:
install
in interfaceIBinManager
- Throws:
ManifoldCFException
-
deinstall
public void deinstall() throws ManifoldCFException
Uninstall.- Specified by:
deinstall
in interfaceIBinManager
- Throws:
ManifoldCFException
-
reset
public void reset() throws ManifoldCFException
Reset all bins- Specified by:
reset
in interfaceIBinManager
- Throws:
ManifoldCFException
-
getIncrementBinValues
public double[] getIncrementBinValues(java.lang.String connectorClass, java.lang.String binName, double newBinValue, int count) throws ManifoldCFException
Get 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:
getIncrementBinValues
in 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 ManifoldCFException
Get 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:
getIncrementBinValuesInTransaction
in 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
-
-