java.lang.Object
net.i2p.router.JobImpl
net.i2p.router.networkdb.kademlia.StartExplorersJob
- All Implemented Interfaces:
Job
This job initiates exploration of the network database by selecting keys to explore and queuing ExploreJobs up to a maximum per run. It adjusts the exploration frequency and intensity based on network conditions such as number of known routers, floodfills, system load, and message delays.
For hidden routers, this job helps maintain integration in the network by aggressively exploring when known peers are few and reducing load otherwise. The job is scheduled to run repeatedly with delays adapted to system load and network state.
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final intLow floodfills threshold.(package private) static final StringProperty to configure number of buckets to explore.(package private) static final StringProperty to configure exploration delay.(package private) static final StringProperty to force exploration even when floodfill.Constructor Summary
ConstructorsConstructorDescriptionStartExplorersJob(RouterContext context, KademliaNetworkDatabaseFacade facade) Job to manage peer exploration scheduling.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
LOW_FFS
PROP_EXPLORE_DELAY
Property to configure exploration delay.- See Also:
PROP_EXPLORE_BUCKETS
Property to configure number of buckets to explore.- See Also:
PROP_FORCE_EXPLORE
Property to force exploration even when floodfill.- See Also:
Constructor Details
StartExplorersJob
Job to manage peer exploration scheduling.- Parameters:
context- the router contextfacade- the network database facade to interact with peer data
Method Details
getName
Name of this job.- Returns:
- the name this job is listed under in the job queue and the logs, "Start NetDb Explorers"
runJob
public void runJob()Runs the job, determines if exploration should occur, how many explorations to run, selects keys to explore, creates and queues ExploreJobs, and schedules the next run.