java.lang.Object
net.i2p.router.JobImpl
net.i2p.router.Blocklist.ReadinJob
- All Implemented Interfaces:
Job
- Enclosing class:
Blocklist
Reads the blocklist files into memory.
Field Summary
FieldsConstructor Summary
ConstructorsConstructorDescriptionReadinJob(List<Blocklist.BLFile> files) Creates the job that reads blocklist files at startup.Method Summary
Methods inherited from class JobImpl
dropped, getContext, getJobId, getMadeReadyOn, getTiming, madeReady, requeue, toStringModifier and TypeMethodDescriptionvoiddropped()Default implementation does nothing.final RouterContextThe router context that this job belongs to.longgetJobId()The unique job ID for this job.longThe timestamp when this job was last made ready for execution.The timing object for this job.voidmadeReady(long now) For JobQueue only, not for external use.protected voidrequeue(long delayMs) Requeue this job to run after the specified delay.toString()
Field Details
_files
The files to read in.
Constructor Details
ReadinJob
Creates the job that reads blocklist files at startup.- Parameters:
files- not necessarily existing, but avoid dups
Method Details
getName
runJob
public void runJob()Description copied from interface:JobActually perform the task. This call blocks until the Job is complete.process
private int process()Reads the blocklist files and counts the entries.- Returns:
- the number of entries read