Package net.i2p.router
Class JobTiming
- java.lang.Object
-
- net.i2p.router.JobTiming
-
- All Implemented Interfaces:
Clock.ClockUpdateListener
public class JobTiming extends Object implements Clock.ClockUpdateListener
Define the timing requirements and statistics for a particular job For use by the router only. Not to be used by applications or plugins.
-
-
Constructor Summary
Constructors Constructor Description JobTiming(RouterContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
end()
Notify the timing that the job finishedlong
getActualEnd()
# of milliseconds after the epoch the job actually endedlong
getActualStart()
# of milliseconds after the epoch the job actually startedlong
getStartAfter()
# of milliseconds after the epoch to start the jobvoid
offsetChanged(long delta)
void
setActualEnd(long actualEndTime)
void
setActualStart(long actualStartTime)
void
setStartAfter(long startTime)
WARNING - this does not force a resort of the job queue any more...void
start()
Notify the timing that the job began
-
-
-
Constructor Detail
-
JobTiming
public JobTiming(RouterContext context)
-
-
Method Detail
-
getStartAfter
public long getStartAfter()
# of milliseconds after the epoch to start the job
-
setStartAfter
public void setStartAfter(long startTime)
WARNING - this does not force a resort of the job queue any more... ALWAYS call JobImpl.requeue() instead if job is already queued.
-
getActualStart
public long getActualStart()
# of milliseconds after the epoch the job actually started
-
setActualStart
public void setActualStart(long actualStartTime)
-
start
public void start()
Notify the timing that the job began
-
getActualEnd
public long getActualEnd()
# of milliseconds after the epoch the job actually ended
-
setActualEnd
public void setActualEnd(long actualEndTime)
-
end
public void end()
Notify the timing that the job finished
-
offsetChanged
public void offsetChanged(long delta)
- Specified by:
offsetChanged
in interfaceClock.ClockUpdateListener
- Parameters:
delta
- = (new offset - old offset), where each offset = (now() - System.currentTimeMillis())
-
-