java.lang.Object
net.i2p.router.JobImpl
net.i2p.router.networkdb.kademlia.FloodfillRouterInfoFloodJob
- All Implemented Interfaces:
Job
Job to flood nearby floodfill routers with our RI. Speeds up integration of new ffs. Created for #1195. Also called when opting out of ff to call off the hounds ASAP. Currently floods FNDF.MAX_TO_FLOOD * 2 routers nearest to us.
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final FloodfillNetworkDatabaseFacadeThe store whose entry is flooded.private final LogLogger for this class.private static final intHow many peers receive the flood, twice the floodfill count.Constructor Summary
ConstructorsConstructorDescriptionFloodfillRouterInfoFloodJob(RouterContext context, FloodfillNetworkDatabaseFacade facade) Stores the network database and the log the flood runs under.Method Summary
All MethodsMethods 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
_log
Logger for this class._facade
The store whose entry is flooded.FLOOD_PEERS
private static final int FLOOD_PEERSHow many peers receive the flood, twice the floodfill count.- See Also:
Constructor Details
FloodfillRouterInfoFloodJob
Stores the network database and the log the flood runs under.- Parameters:
context- the router context whose clock, profile organizer and log manager this job usesfacade- the network database whose local RouterInfo is to be flooded
Method Details
getName
Name of this job.- Returns:
- the fixed label "Distribute Local RouterInfo to Floodfills", used to identify this job in logs and job statistics
runJob
public void runJob()Flood the local RouterInfo out to the floodfill peers.