net.i2p.router
Class JobImpl

java.lang.Object
  extended by net.i2p.router.JobImpl
All Implemented Interfaces:
Job
Direct Known Subclasses:
BootCommSystemJob, BootNetworkDbJob, BootPeerManagerJob, BuildTrustedLinksJob, CreateRouterInfoJob, CreateSessionJob, ExpireJob, ExpireLeasesJob, ExpireRoutersJob, ExploreKeySelectorJob, FloodfillMonitorJob, FloodfillVerifyStoreJob, FloodOnlyLookupMatchJob, FloodOnlyLookupTimeoutJob, FloodSearchJob, GetBidsJob, HandleDatabaseLookupMessageJob, HandleDatabaseStoreMessageJob, HandleFloodfillDatabaseStoreMessageJob, HandleGarlicMessageJob, HarvesterJob, LoadClientAppsJob, LoadClientAppsJob.DelayedRunClient, LoadRouterInfoJob, LookupDestJob, MessageReceivedJob, OutboundClientMessageOneShotJob, PeerTestJob, PublishLocalRouterInfoJob, ReadConfigJob, RebuildRouterInfoJob, ReportAbuseJob, RepublishLeaseSetJob, RepublishLeaseSetJob.OnRepublishFailure, RepublishLeaseSetJob.OnRepublishSuccess, RequestLeaseSetJob, SearchJob, SearchJob.FailedJob, SearchReplyJob, SearchUpdateReplyFoundJob, SendMessageDirectJob, SingleLookupJob, StartAcceptingClientsJob, StartExplorersJob, StartupJob, StoreJob, TestJob

public abstract class JobImpl
extends java.lang.Object
implements Job

Base implementation of a Job


Constructor Summary
JobImpl(RouterContext context)
           
 
Method Summary
(package private)  void addedToQueue()
           
 void dropped()
          the router is extremely overloaded, so this job has been dropped.
 java.lang.Exception getAddedBy()
           
 RouterContext getContext()
           
 long getJobId()
          unique id
 long getMadeReadyOn()
           
 JobTiming getTiming()
          Timing criteria for the task
 void madeReady()
           
protected  void requeue(long delayMs)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface net.i2p.router.Job
getName, runJob
 

Constructor Detail

JobImpl

public JobImpl(RouterContext context)
Method Detail

getJobId

public long getJobId()
Description copied from interface: Job
unique id

Specified by:
getJobId in interface Job

getTiming

public JobTiming getTiming()
Description copied from interface: Job
Timing criteria for the task

Specified by:
getTiming in interface Job

getContext

public final RouterContext getContext()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

addedToQueue

void addedToQueue()

getAddedBy

public java.lang.Exception getAddedBy()
Specified by:
getAddedBy in interface Job

getMadeReadyOn

public long getMadeReadyOn()

madeReady

public void madeReady()

dropped

public void dropped()
Description copied from interface: Job
the router is extremely overloaded, so this job has been dropped. if for some reason the job *must* do some cleanup / requeueing of other tasks, it should do so here.

Specified by:
dropped in interface Job

requeue

protected void requeue(long delayMs)