On 20/07/18 15:42, Andrew Stitcher wrote:
I think I can help shed some light on the original intention of these
two methods:

Essentially they are intended for different purposes: (As Gordon says)
setUpNextFire() is intended only for use with periodic timers and is
intended to be used to set up the next firing *after the time has just
fired*; restart() is intended to be used to delay firing a timer and so
is used *before* a timer has elapsed - specifically restart() is used
where you have a time out that needs to be extended because the
something happened.

For example restart() is useed in processing idle timeout in qpid. Such
that a timer is set for the timeout and every time a frame is received
the timer is restarted, so that the timer is not fired unless the
timeout occurs from the last frame received.

I think in the case of the journal flush restart is the likely
semantics you want - you want to have an idle timer timeout which is
extended (and hence not fired) every time the journal gets written. If
the timeout elapses after the last journal write the time will fire.

I believe Kim is using restart() but is debugging some issue where the task is postponed after it has already fired, which he does not want (not sure why not). Is that right Kim?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
For additional commands, e-mail: users-h...@qpid.apache.org

Reply via email to