public class IntrinsicLink extends BaseTable
Field | Type | Description |
---|---|---|
jobid | BIGINT | Reference:jobs.id |
linktype | VARCHAR(255) | |
parentidhash | VARCHAR(40) | |
childidhash | VARCHAR(40) | |
isnew | CHAR(1) | |
processid | VARCHAR(16) |
Modifier and Type | Class and Description |
---|---|
protected static class |
IntrinsicLink.DuplicateFinder |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
_rcsid |
static java.lang.String |
childIDHashField |
static java.lang.String |
jobIDField |
protected static int |
LINKSTATUS_BASE
The standard value for this field.
|
protected static int |
LINKSTATUS_EXISTING
This value means that the link existed before, and has been found during this scan.
|
protected static int |
LINKSTATUS_NEW
This value means that the link is brand-new; it did not exist before this pass.
|
protected static java.util.Map |
linkstatusMap |
static java.lang.String |
linkTypeField |
static java.lang.String |
newField |
static java.lang.String |
parentIDHashField |
static java.lang.String |
processIDField |
dbInterface, tableName
Constructor and Description |
---|
IntrinsicLink(IDBInterface database)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
analyzeTables()
Analyze job tables that need analysis.
|
void |
deinstall()
Uninstall.
|
void |
deleteOwner(java.lang.Long jobID)
Delete an owner (and clean up the corresponding hopcount rows).
|
IResultSet |
getDocumentChildren(java.lang.Long jobID,
java.lang.String parentIDHash)
Get document's children.
|
java.lang.String[] |
getDocumentUniqueParents(java.lang.Long jobID,
java.lang.String childIDHash)
Get document's parents.
|
void |
install(java.lang.String jobsTable,
java.lang.String jobsColumn)
Install or upgrade.
|
protected int |
maxClausePerformExistsCheck(java.lang.Long jobID,
java.lang.String linkType,
java.lang.String childIDHash)
Calculate the max clauses for the exists check
|
protected int |
maxClausePerformRemoveDocumentLinks(java.lang.Long jobID) |
protected int |
maxClausePerformRemoveLinks(java.lang.Long jobID) |
protected int |
maxClausesPerformRestoreLinks(java.lang.Long jobID) |
protected int |
maxClausesPerformRevertLinks(java.lang.Long jobID) |
protected void |
performExistsCheck(java.util.Set<java.lang.String> presentMap,
java.lang.Long jobID,
java.lang.String linkType,
java.lang.String childIDHash,
java.util.List<java.lang.String> list)
Do the exists check, in batch.
|
protected void |
performRemoveDocumentLinks(java.util.List<java.lang.String> list,
java.lang.Long jobID) |
protected void |
performRemoveLinks(java.util.List<java.lang.String> list,
java.lang.Long jobID,
java.lang.String commonNewExpression,
java.util.ArrayList commonNewParams) |
protected void |
performRestoreLinks(java.lang.Long jobID,
java.util.List<java.lang.String> list) |
protected void |
performRevertLinks(java.lang.Long jobID,
java.util.List<java.lang.String> list) |
java.lang.String[] |
recordReferences(java.lang.Long jobID,
java.lang.String sourceDocumentIDHash,
java.lang.String[] targetDocumentIDHashes,
java.lang.String linkType,
java.lang.String processID)
Record a references from source to targets.
|
void |
removeDocumentLinks(java.lang.Long jobID,
java.lang.String[] documentIDHashes)
Remove all links that mention a specific set of documents.
|
void |
removeDocumentLinks(java.lang.Long jobID,
java.lang.String joinTableName,
java.lang.String joinTableIDColumn,
java.lang.String joinTableJobColumn,
java.lang.String joinTableCriteria,
java.util.ArrayList joinTableParams)
Remove all links that mention a specific set of documents, as described by a join.
|
void |
removeLinks(java.lang.Long jobID,
java.lang.String commonNewExpression,
java.util.ArrayList commonNewParams,
java.lang.String[] sourceDocumentIDHashes)
Remove all target links of the specified source documents that are not marked as "new" or "existing", and
return the others to their base state.
|
void |
restart()
Clean up after all process IDs
|
void |
restart(java.lang.String processID)
Reset, at startup time.
|
void |
restartCluster() |
void |
restoreLinks(java.lang.Long jobID,
java.lang.String[] sourceDocumentIDHashes)
Return all target links of the specified source documents to their base state.
|
void |
revertLinks(java.lang.Long jobID,
java.lang.String[] sourceDocumentIDHashes)
Throw away links added during (aborted) processing.
|
static java.lang.String |
statusToString(int status)
Convert link status to string
|
static int |
stringToStatus(java.lang.String status)
Convert string to link status.
|
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
public static final java.lang.String _rcsid
protected static final int LINKSTATUS_BASE
protected static final int LINKSTATUS_NEW
protected static final int LINKSTATUS_EXISTING
public static final java.lang.String jobIDField
public static final java.lang.String linkTypeField
public static final java.lang.String parentIDHashField
public static final java.lang.String childIDHashField
public static final java.lang.String newField
public static final java.lang.String processIDField
protected static java.util.Map linkstatusMap
public IntrinsicLink(IDBInterface database) throws ManifoldCFException
database
- is the database handle.ManifoldCFException
public void install(java.lang.String jobsTable, java.lang.String jobsColumn) throws ManifoldCFException
ManifoldCFException
public void deinstall() throws ManifoldCFException
ManifoldCFException
public void analyzeTables() throws ManifoldCFException
ManifoldCFException
public void deleteOwner(java.lang.Long jobID) throws ManifoldCFException
ManifoldCFException
public void restart(java.lang.String processID) throws ManifoldCFException
processID
- is the process to restart.ManifoldCFException
public void restart() throws ManifoldCFException
ManifoldCFException
public void restartCluster() throws ManifoldCFException
ManifoldCFException
public java.lang.String[] recordReferences(java.lang.Long jobID, java.lang.String sourceDocumentIDHash, java.lang.String[] targetDocumentIDHashes, java.lang.String linkType, java.lang.String processID) throws ManifoldCFException
ManifoldCFException
protected int maxClausePerformExistsCheck(java.lang.Long jobID, java.lang.String linkType, java.lang.String childIDHash)
protected void performExistsCheck(java.util.Set<java.lang.String> presentMap, java.lang.Long jobID, java.lang.String linkType, java.lang.String childIDHash, java.util.List<java.lang.String> list) throws ManifoldCFException
ManifoldCFException
public void removeDocumentLinks(java.lang.Long jobID, java.lang.String joinTableName, java.lang.String joinTableIDColumn, java.lang.String joinTableJobColumn, java.lang.String joinTableCriteria, java.util.ArrayList joinTableParams) throws ManifoldCFException
ManifoldCFException
public void removeDocumentLinks(java.lang.Long jobID, java.lang.String[] documentIDHashes) throws ManifoldCFException
ManifoldCFException
protected int maxClausePerformRemoveDocumentLinks(java.lang.Long jobID)
protected void performRemoveDocumentLinks(java.util.List<java.lang.String> list, java.lang.Long jobID) throws ManifoldCFException
ManifoldCFException
public void removeLinks(java.lang.Long jobID, java.lang.String commonNewExpression, java.util.ArrayList commonNewParams, java.lang.String[] sourceDocumentIDHashes) throws ManifoldCFException
ManifoldCFException
protected int maxClausePerformRemoveLinks(java.lang.Long jobID)
protected void performRemoveLinks(java.util.List<java.lang.String> list, java.lang.Long jobID, java.lang.String commonNewExpression, java.util.ArrayList commonNewParams) throws ManifoldCFException
ManifoldCFException
public void restoreLinks(java.lang.Long jobID, java.lang.String[] sourceDocumentIDHashes) throws ManifoldCFException
ManifoldCFException
protected int maxClausesPerformRestoreLinks(java.lang.Long jobID)
protected void performRestoreLinks(java.lang.Long jobID, java.util.List<java.lang.String> list) throws ManifoldCFException
ManifoldCFException
public void revertLinks(java.lang.Long jobID, java.lang.String[] sourceDocumentIDHashes) throws ManifoldCFException
ManifoldCFException
protected int maxClausesPerformRevertLinks(java.lang.Long jobID)
protected void performRevertLinks(java.lang.Long jobID, java.util.List<java.lang.String> list) throws ManifoldCFException
ManifoldCFException
public IResultSet getDocumentChildren(java.lang.Long jobID, java.lang.String parentIDHash) throws ManifoldCFException
ManifoldCFException
public java.lang.String[] getDocumentUniqueParents(java.lang.Long jobID, java.lang.String childIDHash) throws ManifoldCFException
ManifoldCFException
public static int stringToStatus(java.lang.String status)
public static java.lang.String statusToString(int status)