public class SeedingActivity extends java.lang.Object implements ISeedingActivity
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
_rcsid |
protected IRepositoryConnection |
connection |
protected java.lang.String |
connectionName |
protected IRepositoryConnector |
connector |
protected IRepositoryConnectionManager |
connManager |
protected int |
documentCount |
protected java.lang.String[] |
documentHashList |
protected java.lang.String[] |
documentList |
protected java.lang.String[][] |
documentPrereqList |
protected int |
hopcountMethod |
protected java.lang.Long |
jobID |
protected IJobManager |
jobManager |
protected java.lang.String[] |
legalLinkTypes |
protected static int |
MAX_COUNT |
protected boolean |
overrideSchedule |
protected java.lang.String |
processID |
protected int |
remainingDocumentCount |
protected java.lang.String[] |
remainingDocumentHashList |
protected IReprioritizationTracker |
rt |
BAD_URL, EXCLUDED_CONTENT, EXCLUDED_DATE, EXCLUDED_LENGTH, EXCLUDED_MIMETYPE, EXCLUDED_URL, NULL_URL
Constructor and Description |
---|
SeedingActivity(java.lang.String connectionName,
IRepositoryConnectionManager connManager,
IJobManager jobManager,
IReprioritizationTracker rt,
IRepositoryConnection connection,
IRepositoryConnector connector,
java.lang.Long jobID,
java.lang.String[] legalLinkTypes,
boolean overrideSchedule,
int hopcountMethod,
java.lang.String processID)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addSeedDocument(java.lang.String documentIdentifier)
Record a "seed" document identifier.
|
void |
addSeedDocument(java.lang.String documentIdentifier,
java.lang.String[] prereqEventNames)
Record a "seed" document identifier.
|
void |
addUnqueuedSeedDocument(java.lang.String documentIdentifier)
This method receives document identifiers that should be considered part of the seeds, but do not need to be
queued for processing at this time.
|
void |
checkJobStillActive()
Check whether current job is still active.
|
java.lang.String |
createConnectionSpecificString(java.lang.String simpleString)
Create a connection-specific string from a simple string.
|
java.lang.String |
createGlobalString(java.lang.String simpleString)
Create a global string from a simple string.
|
java.lang.String |
createJobSpecificString(java.lang.String simpleString)
Create a job-based string from a simple string.
|
void |
doneSeeding(boolean isPartial)
Finish a seeding pass
|
void |
recordActivity(java.lang.Long startTime,
java.lang.String activityType,
java.lang.Long dataSize,
java.lang.String entityIdentifier,
java.lang.String resultCode,
java.lang.String resultDescription,
java.lang.String[] childIdentifiers)
Record time-stamped information about the activity of the connector.
|
protected void |
writeSeedDocuments(java.lang.String[] docIDHashes,
java.lang.String[] docIDs,
java.lang.String[][] prereqEventNames)
Write specified documents after calculating their priorities
|
public static final java.lang.String _rcsid
protected static final int MAX_COUNT
protected final java.lang.String processID
protected final java.lang.String connectionName
protected final IRepositoryConnectionManager connManager
protected final IJobManager jobManager
protected final IReprioritizationTracker rt
protected final IRepositoryConnection connection
protected final IRepositoryConnector connector
protected final java.lang.Long jobID
protected final java.lang.String[] legalLinkTypes
protected final boolean overrideSchedule
protected final int hopcountMethod
protected final java.lang.String[] documentHashList
protected final java.lang.String[] documentList
protected final java.lang.String[][] documentPrereqList
protected int documentCount
protected final java.lang.String[] remainingDocumentHashList
protected int remainingDocumentCount
public SeedingActivity(java.lang.String connectionName, IRepositoryConnectionManager connManager, IJobManager jobManager, IReprioritizationTracker rt, IRepositoryConnection connection, IRepositoryConnector connector, java.lang.Long jobID, java.lang.String[] legalLinkTypes, boolean overrideSchedule, int hopcountMethod, java.lang.String processID)
public void addSeedDocument(java.lang.String documentIdentifier, java.lang.String[] prereqEventNames) throws ManifoldCFException
addSeedDocument
in interface ISeedingActivity
documentIdentifier
- is the identifier of the document to add to the "pending" queue.prereqEventNames
- is the list of prerequisite events required for this document, or null if none.ManifoldCFException
public void addSeedDocument(java.lang.String documentIdentifier) throws ManifoldCFException
addSeedDocument
in interface ISeedingActivity
documentIdentifier
- is the identifier of the document to add to the "pending" queue.ManifoldCFException
public void addUnqueuedSeedDocument(java.lang.String documentIdentifier) throws ManifoldCFException
addUnqueuedSeedDocument
in interface ISeedingActivity
documentIdentifier
- is the identifier of the document to consider as a seed, but not to put in the
"pending" queue.ManifoldCFException
public void doneSeeding(boolean isPartial) throws ManifoldCFException
ManifoldCFException
public void recordActivity(java.lang.Long startTime, java.lang.String activityType, java.lang.Long dataSize, java.lang.String entityIdentifier, java.lang.String resultCode, java.lang.String resultDescription, java.lang.String[] childIdentifiers) throws ManifoldCFException
recordActivity
in interface IHistoryActivity
startTime
- is either null or the time since the start of epoch in milliseconds (Jan 1, 1970). Every
activity has an associated time; the startTime field records when the activity began. A null value
indicates that the start time and the finishing time are the same.activityType
- is a string which is fully interpretable only in the context of the connector involved, which is
used to categorize what kind of activity is being recorded. For example, a web connector might record a
"fetch document" activity. Cannot be null.dataSize
- is the number of bytes of data involved in the activity, or null if not applicable.entityIdentifier
- is a (possibly long) string which identifies the object involved in the history record.
The interpretation of this field will differ from connector to connector. May be null.resultCode
- contains a terse description of the result of the activity. The description is limited in
size to 255 characters, and can be interpreted only in the context of the current connector. May be null.resultDescription
- is a (possibly long) human-readable string which adds detail, if required, to the result
described in the resultCode field. This field is not meant to be queried on. May be null.childIdentifiers
- is a set of child entity identifiers associated with this activity. May be null.ManifoldCFException
protected void writeSeedDocuments(java.lang.String[] docIDHashes, java.lang.String[] docIDs, java.lang.String[][] prereqEventNames) throws ManifoldCFException
ManifoldCFException
public void checkJobStillActive() throws ManifoldCFException, ServiceInterruption
checkJobStillActive
in interface IAbortActivity
ManifoldCFException
ServiceInterruption
public java.lang.String createGlobalString(java.lang.String simpleString)
createGlobalString
in interface INamingActivity
simpleString
- is the simple string.public java.lang.String createConnectionSpecificString(java.lang.String simpleString)
createConnectionSpecificString
in interface INamingActivity
simpleString
- is the simple string.public java.lang.String createJobSpecificString(java.lang.String simpleString)
createJobSpecificString
in interface INamingActivity
simpleString
- is the simple string.