cluck 1.0.1
The cluster lock service.
timer.h
Go to the documentation of this file.
1// Copyright (c) 2016-2025 Made to Order Software Corp. All Rights Reserved
2//
3// https://snapwebsites.org/project/cluck
4// contact@m2osw.com
5//
6// This program is free software: you can redistribute it and/or modify
7// it under the terms of the GNU General Public License as published by
8// the Free Software Foundation, either version 3 of the License, or
9// (at your option) any later version.
10//
11// This program is distributed in the hope that it will be useful,
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14// GNU General Public License for more details.
15//
16// You should have received a copy of the GNU General Public License
17// along with this program. If not, see <https://www.gnu.org/licenses/>.
18#pragma once
19
20// eventdispatcher
21//
22#include <eventdispatcher/timer.h>
23
24
25
26namespace cluck_daemon
27{
28
29
30
31class cluckd;
32
33
34class timer
35 : public ed::timer
36{
37public:
38 typedef std::shared_ptr<ed::timer> pointer_t;
39
40 timer(cluckd * c);
41 timer(timer const &) = delete;
42 virtual ~timer() override;
43
44 timer & operator = (timer const &) = delete;
45
46 // ed::connection implementation
47 virtual void process_timeout() override;
48
49private:
50 cluckd * f_cluckd = nullptr;
51};
52
53
54
55} // namespace cluck_deamon
56// vim: ts=4 sw=4 et
Class handling intercomputer locking.
Definition cluckd.h:48
Handle the timeouts.
Definition timer.h:36
std::shared_ptr< ed::timer > pointer_t
Definition timer.h:38
virtual void process_timeout() override
Call the cleanup() function of the cluckd object.
Definition timer.cpp:77
timer & operator=(timer const &)=delete
cluckd * f_cluckd
Definition timer.h:50
timer(timer const &)=delete
virtual ~timer() override
Definition timer.cpp:66

This document is part of the Snap! Websites Project.

Copyright by Made to Order Software Corp.