]> git.ipfire.org Git - thirdparty/squid.git/blob - src/mgr/StoreIoAction.h
SourceFormat Enforcement
[thirdparty/squid.git] / src / mgr / StoreIoAction.h
1 /*
2 * $Id$
3 *
4 * DEBUG: section 16 Cache Manager API
5 *
6 */
7
8 #ifndef SQUID_MGR_STORE_IO_ACTION_H
9 #define SQUID_MGR_STORE_IO_ACTION_H
10
11 #include "mgr/Action.h"
12
13 namespace Mgr
14 {
15
16 /// Store IO interface data
17 class StoreIoActionData
18 {
19 public:
20 StoreIoActionData();
21 StoreIoActionData& operator += (const StoreIoActionData& stats);
22
23 public:
24 double create_calls;
25 double create_select_fail;
26 double create_create_fail;
27 double create_success;
28 };
29
30 /// implement aggregated 'store_io' action
31 class StoreIoAction: public Action
32 {
33 protected:
34 StoreIoAction(const CommandPointer &cmd);
35
36 public:
37 static Pointer Create(const CommandPointer &cmd);
38 /* Action API */
39 virtual void add(const Action& action);
40 virtual void pack(Ipc::TypedMsgHdr& msg) const;
41 virtual void unpack(const Ipc::TypedMsgHdr& msg);
42
43 protected:
44 /* Action API */
45 virtual void collect();
46 virtual void dump(StoreEntry* entry);
47
48 private:
49 StoreIoActionData data;
50 };
51
52 } // namespace Mgr
53
54 #endif /* SQUID_MGR_STORE_IO_ACTION_H */