Timeout manager
Timeout manager base class. Required for derivation because inside a TimeoutManager subclass a nested ExpiryRegistration subclass is impossible.
Link with: -Llibebtree.a
Build flags: -debug=TimeoutManager = verbose output
Boost Software License Version 1.0. See LICENSE_BOOST.txt for details. Alternatively, this file may be distributed under the terms of the Tango 3-Clause BSD License (see LICENSE_BSD.txt for details).
Copyright (c) 2009-2016 dunnhumby Germany GmbH. All rights reserved.
Manages ITimeoutClient instances where each one has an individual timeout value.
To use the timeout manager, create a TimeoutManager subclass capable of these two things: 1. It implements setTimeout() to set a timer that expires at the wall clock time that is passed to setTimeout() as argument. 2. When the timer is expired, it calls checkTimeouts().
Objects that can time out, the so-called timeout clients, must implement ITimeoutClient. For each client create an ExpiryRegistration instance and pass the object to the ExpiryRegistration constructor. Call ExpiryRegistration.register() to set a timeout for the corresponding client. When checkTimeouts() is called, it calls the timeout() method of each timed out client.