folly::HHWheelTimerBase::Callback

A callback to be notified when a timeout has expired.

Synopsis

Declared in <folly/io/async/HHWheelTimer.h>

class Callback
    : public boost::intrusive::list_base_hook<boost::intrusive::link_mode<boost::intrusive::auto_unlink>>

Base Classes

NameDescription
boost::intrusive::list_base_hook<boost::intrusive::link_mode<boost::intrusive::auto_unlink>>

Member Functions

NameDescription
Callback [constructor]Constructs an unscheduled callback.
~Callback [destructor] [virtual]Destroys the callback, canceling it if still scheduled.
callbackCanceled [virtual]This callback was canceled. The default implementation is to just proxy to timeoutExpired but if you care about the difference between the timeout finishing or being canceled you can override this.
cancelTimeout Cancel the timeout, if it is running.
getTimeRemaining Get the time remaining until this timeout expires. Return 0 if this timeout is not scheduled or expired. Otherwise, return expiration time minus current time.
isScheduled Return true if this timeout is currently scheduled, and false otherwise.
timeoutExpired [virtual]timeoutExpired() is invoked when the timeout has expired.

Friends

NameDescription
folly::HHWheelTimerBaseHashed Hierarchical Wheel Timer