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, FloodfillRouterInfoFloodJob, FloodfillVerifyStoreJob, FloodOnlyLookupMatchJob, FloodOnlyLookupTimeoutJob, FloodSearchJob, GetBidsJob, HandleDatabaseLookupMessageJob, HandleFloodfillDatabaseStoreMessageJob, HandleGarlicMessageJob, IterativeLookupJob, IterativeTimeoutJob, LoadClientAppsJob, LoadRouterInfoJob, LookupDestJob, MessageReceivedJob, OutboundClientMessageOneShotJob, PeerTestJob, PersistRouterInfoJob, PublishLocalRouterInfoJob, ReadConfigJob, RebuildRouterInfoJob, RefreshRoutersJob, ReportAbuseJob, RepublishLeaseSetJob, RequestLeaseSetJob, SearchJob, SearchJob.FailedJob, SearchReplyJob, SearchUpdateReplyFoundJob, SendMessageDirectJob, SingleLookupJob, StartAcceptingClientsJob, StartExplorersJob, StartupJob, StoreJob, TestJob, UpdateRoutingKeyModifierJob

public abstract class JobImpl
extends Object
implements Job

Base implementation of a Job For use by the router only. Not to be used by applications or plugins.


Constructor Summary
JobImpl(RouterContext context)
           
 
Method Summary
(package private)  void addedToQueue()
          Deprecated. As of 0.8.1, this is a noop, as it just adds classes to the log manager class list for no good reason. Logging in jobs is almost always set explicitly rather than by class name.
 void dropped()
          the router is extremely overloaded, so this job has been dropped.
 Exception getAddedBy()
          Deprecated.  
 RouterContext getContext()
           
 long getJobId()
          unique id
 long getMadeReadyOn()
           
 JobTiming getTiming()
          Timing criteria for the task
 void madeReady()
           
protected  void requeue(long delayMs)
          Warning - only call this from runJob() or if Job is not already queued, or else it gets the job queue out of order.
 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 String toString()
Overrides:
toString in class Object

addedToQueue

void addedToQueue()
Deprecated. As of 0.8.1, this is a noop, as it just adds classes to the log manager class list for no good reason. Logging in jobs is almost always set explicitly rather than by class name.


getAddedBy

public Exception getAddedBy()
Deprecated. 

Specified by:
getAddedBy in interface Job
Returns:
null always

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)
Warning - only call this from runJob() or if Job is not already queued, or else it gets the job queue out of order.