version 0.3.33
[fms.git] / include / dbmaintenancethread.h
1 #ifndef _dbmaintenancethread_\r
2 #define _dbmaintenancethread_\r
3 \r
4 #include "threadwrapper/cancelablerunnable.h"\r
5 #include "ilogger.h"\r
6 #include "ithreaddatabase.h"\r
7 \r
8 #include <Poco/DateTime.h>\r
9 \r
10 class DBMaintenanceThread:public CancelableRunnable,public ILogger,public IThreadDatabase\r
11 {\r
12 public:\r
13         DBMaintenanceThread();\r
14 \r
15         void run();\r
16 \r
17 private:\r
18 \r
19         void Do10MinuteMaintenance();\r
20         void Do30MinuteMaintenance();\r
21         void Do1HourMaintenance();\r
22         void Do6HourMaintenance();\r
23         void Do1DayMaintenance();\r
24 \r
25         Poco::DateTime m_last10minute;\r
26         Poco::DateTime m_last30minute;\r
27         Poco::DateTime m_last1hour;\r
28         Poco::DateTime m_last6hour;\r
29         Poco::DateTime m_last1day;\r
30 \r
31         long m_deletemessagesolderthan;\r
32         long m_messagedownloadmaxdaysbackward;\r
33         long m_frostmaxdaysbackward;\r
34 \r
35 };\r
36 \r
37 #endif  // _dbmaintenancethread_\r