public class PersistLogProcessor extends PersistProcessor implements Checkpointable, org.springframework.context.Lifecycle
Modifier and Type | Field and Description |
---|---|
protected CrawlerJournal |
log |
protected ConfigPath |
logFile |
HISTORY_DB_CONFIG, URI_HISTORY_DBNAME
onlyStoreIfWriteTagPresent
Constructor and Description |
---|
PersistLogProcessor() |
Modifier and Type | Method and Description |
---|---|
void |
doCheckpoint(Checkpoint checkpointInProgress)
Do the actual checkpoint.
|
void |
finishCheckpoint(Checkpoint checkpointInProgress)
Cleanup/unlock; need not complete for a checkpoint to be valid.
|
ConfigPath |
getLogFile() |
protected void |
innerProcess(CrawlURI curi)
Actually performs the process.
|
boolean |
isRunning() |
void |
setLogFile(ConfigPath path) |
protected boolean |
shouldProcess(CrawlURI uri)
Determines whether the given uri should be processed by this
processor.
|
void |
start() |
void |
startCheckpoint(Checkpoint checkpointInProgress)
Note a checkpoint is about to begin.
|
void |
stop() |
copyPersistSourceToHistoryMap, copyPersistSourceToHistoryMap, main, persistKeyFor, persistKeyFor, populatePersistEnv, setupCopyEnvironment, setupCopyEnvironment
getOnlyStoreIfWriteTagPresent, hasWriteTag, setOnlyStoreIfWriteTagPresent, shouldLoad, shouldStore
flattenVia, fromCheckpointJson, getBeanName, getEnabled, getKeyedProperties, getRecordedSize, getShouldProcessRule, getURICount, hasHttpAuthenticationCredential, innerProcessResult, innerRejectProcess, isSuccess, process, report, setBeanName, setEnabled, setRecoveryCheckpoint, setShouldProcessRule, toCheckpointJson
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setRecoveryCheckpoint
protected CrawlerJournal log
protected ConfigPath logFile
public ConfigPath getLogFile()
public void setLogFile(ConfigPath path)
public void start()
public boolean isRunning()
public void stop()
protected void innerProcess(CrawlURI curi)
Processor
#ENABLED
, the
#DECIDE_RULES
and the #shouldProcess(ProcessorURI)
tests.innerProcess
in class Processor
curi
- the URI to processpublic void startCheckpoint(Checkpoint checkpointInProgress)
Checkpointable
startCheckpoint
in interface Checkpointable
startCheckpoint
in class Processor
checkpointInProgress
- Checkpointpublic void doCheckpoint(Checkpoint checkpointInProgress) throws IOException
Checkpointable
doCheckpoint
in interface Checkpointable
doCheckpoint
in class Processor
checkpointInProgress
- CheckpointIOException
public void finishCheckpoint(Checkpoint checkpointInProgress)
Checkpointable
finishCheckpoint
in interface Checkpointable
finishCheckpoint
in class Processor
checkpointInProgress
- Checkpointprotected boolean shouldProcess(CrawlURI uri)
Processor
shouldProcess
in class Processor
uri
- the URI to testCopyright © 2003-2014 Internet Archive. All Rights Reserved.