|
cluck 1.0.1
The cluster lock service.
|
Handle the timeouts. More...
#include <timer.h>


Public Types | |
| typedef std::shared_ptr< ed::timer > | pointer_t |
Public Member Functions | |
| timer (cluckd *c) | |
| The timer initialization. | |
| timer (timer const &)=delete | |
| virtual | ~timer () override |
| timer & | operator= (timer const &)=delete |
| virtual void | process_timeout () override |
| Call the cleanup() function of the cluckd object. | |
Private Attributes | |
| cluckd * | f_cluckd = nullptr |
This class is used to time out locks. Whenever we receive a new LOCK message or enter a lock the timer is reset with the next lock that is going to time out. When that happens, the cleanup() function gets called. Any lock which timed out is removed and the user on the other end is told about the problem with an UNLOCKING, UNLOCKED or LOCK_FAILED message as the case may be.
| typedef std::shared_ptr<ed::timer> cluck_daemon::timer::pointer_t |
| cluck_daemon::timer::timer | ( | cluckd * | c | ) |
|
delete |
|
overridevirtual |
A timeout happened, call the cluckd::cleanup() function which takes care of cleaning up the list of lock requests and existing locks that timed out.
Definition at line 77 of file timer.cpp.
References cluck_daemon::cluckd::cleanup(), and f_cluckd.
|
private |
Definition at line 50 of file timer.h.
Referenced by process_timeout().
This document is part of the Snap! Websites Project.
Copyright by Made to Order Software Corp.