java.lang.Object
net.i2p.router.JobImpl
- All Implemented Interfaces:
Job
- Direct Known Subclasses:
Analysis, Analysis.InitJob, Banlist.Cleanup, Blocklist.BanlistJob, Blocklist.CleanupJob, Blocklist.ReadinJob, BootCommSystemJob, BootNetworkDbJob, BootPeerManagerJob, BuildHandler.HandleReq, BuildHandler.TimeoutReq, BuildHandler.TunnelBuildMessageHandlerJob, BuildHandler.TunnelBuildNextHopFailJob, BuildHandler.TunnelBuildReplyMessageHandlerJob, BuildRequestor.TunnelBuildFirstHopFailJob, BuildTrustedLinksJob, ClientConnectionRunner.MessageDeliveryStatusUpdate, ClientManager.DistributeLocal, ClientManager.HandleJob, ContactDrivenRefreshJob, CreateRouterInfoJob, CreateSessionJob, ExpireJob, ExpireLeasesJob, ExpireRoutersJob, FloodfillMonitorJob, FloodfillNetworkDatabaseFacade.DropLookupFailedJob, FloodfillNetworkDatabaseFacade.DropLookupFoundJob, FloodfillNetworkDatabaseFacade.FloodFailedJob, FloodfillNetworkDatabaseFacade.FloodSuccessJob, FloodfillRouterInfoFloodJob, FloodfillVerifyStoreJob, FloodfillVerifyStoreJob.VerifyReplyJob, FloodfillVerifyStoreJob.VerifyTimeoutJob, FloodOnlyLookupMatchJob, FloodOnlyLookupTimeoutJob, FloodSearchJob, HandleDatabaseLookupMessageJob, HandleFloodfillDatabaseStoreMessageJob, HandleGarlicMessageJob, InboundGatewayReceiver.ReceiveJob, InNetMessagePool.SharedShortCircuitDataJob, InNetMessagePool.SharedShortCircuitGatewayJob, IntroducerLookupJob, IterativeLookupJob, IterativeTimeoutJob, KademliaNetworkDatabaseFacade.BatchRepublishJob, KademliaNetworkDatabaseFacade.PurgeMatchingRoutersJob, KademliaNetworkDatabaseFacade.RefreshClientLeaseSetsJob, KeyManager.SynchronizeKeysJob, LoadClientAppsJob, LoadRouterInfoJob, LookupDestJob, LookupDestJob.DoneJob, MessageHistory.ReinitializeJob, MessageHistory.WriteJob, MessageReceivedJob, NetDbRenderer.LookupWaiter, OutboundClientMessageOneShotJob, OutboundClientMessageOneShotJob.DispatchJob, OutboundClientMessageOneShotJob.LookupLeaseSetFailedJob, OutboundClientMessageOneShotJob.SendJob, OutboundClientMessageOneShotJob.SendSuccessJob, OutboundClientMessageOneShotJob.SendTimeoutJob, OutboundMessageDistributor.DistributeJob, OutboundReceiver.LookupFailedJob, OutboundReceiver.SendFailedJob, OutboundReceiver.SendJob, PeerTestJob, PeerTestJob.PeerReplyFoundJob, PeerTestJob.PeerReplyTimeoutJob, PersistentDataStore.ReadJob, PersistentDataStore.ReadRouterJob, PersistRouterInfoJob, ProbeStalePeerJob, PublishLocalRouterInfoJob, ReadConfigJob, RebuildRouterInfoJob, RefreshRoutersJob, ReportAbuseJob, RepublishLeaseSetJob, RepublishLeaseSetJob.OnRepublishFailure, RepublishLeaseSetJob.OnRepublishSuccess, RequestLeaseSetJob, RequestLeaseSetJob.CheckLeaseRequestStatus, SearchJob, SearchJob.FailedJob, SearchJob.RequeuePending, SearchReplyJob, SearchUpdateReplyFoundJob, SendMessageDirectJob, SingleLookupJob, StartAcceptingClientsJob, StartExplorersJob, StartupJob, StoreJob, StoreJob.FailedJob, StoreJob.SendSuccessJob, StoreJob.WaitJob, TestJob, TestJob.OnTestReply, TestJob.OnTestTimeout, TestJob.PumpJob, TunnelDispatcher.LeaveTunnel, TunnelParticipant.Found, TunnelParticipant.SendJob, TunnelParticipant.TimeoutJob, TunnelPeerSelector.PreConnectFailJob, TunnelPoolManager.BootstrapPool, TunnelPoolManager.FastTierProbeJob, TunnelPoolManager.RefreshLeaseSetsJob, TunnelPoolManager.RemoveSlowTunnelsJob, UpdateRoutingKeyModifierJob, VMCommSystem.ReceiveJob
Field Summary
Modifier and TypeFieldDescriptionprivate final RouterContextThe router context the job runs in.final longUnique job identifier.private static final AtomicLongHands out the next job id.private longWhen the job was last made ready, in ms.private final JobTimingWhen the job was scheduled and ran.Constructor Summary
ConstructorsMethod Summary
Public MethodsModifier 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
_context
The router context the job runs in._timing
When the job was scheduled and ran._idSrc
Hands out the next job id._id
public final long _idUnique job identifier. Public so the job number can be referenced for tunnel builds on /jobs._madeReadyOn
private volatile long _madeReadyOnWhen the job was last made ready, in ms.
Constructor Details
JobImpl
Create a new JobImpl.- Parameters:
context- the router context that will run this job
Method Details
getJobId
getTiming
getContext
The router context that this job belongs to.- Returns:
- the RouterContext for this job
toString
getMadeReadyOn
public long getMadeReadyOn()The timestamp when this job was last made ready for execution.- Returns:
- timestamp in milliseconds when job was made ready, or 0 if not yet ready
madeReady
public void madeReady(long now) For JobQueue only, not for external use.- Parameters:
now- the current time in milliseconds
dropped
requeue
protected void requeue(long delayMs) Requeue this job to run after the specified delay. Warning - only call this from runJob() or if the Job is not already queued, otherwise it may get the job queue out of order.- Parameters:
delayMs- the delay in milliseconds before the job should run again