RemovalPolicy.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2018 The Squid Software Foundation and contributors
3  *
4  * Squid software is distributed under GPLv2+ license and includes
5  * contributions from numerous individuals and organizations.
6  * Please see the COPYING and CONTRIBUTORS files for details.
7  */
8 
9 #ifndef SQUID_REMOVALPOLICY_H
10 #define SQUID_REMOVALPOLICY_H
11 
12 #include "cbdata.h"
13 
15 class RemovalPurgeWalker;
16 class wordlist;
17 class StoreEntry;
18 
20 {
21 
22 public:
24 
25  char *type;
27 };
28 
30 {
31 
32 public:
34 
35  void *data;
36 };
37 
39 {
41 
42 public:
43  const char *_type;
44  void *_data;
45  void (*Free) (RemovalPolicy * policy);
46  void (*Add) (RemovalPolicy * policy, StoreEntry * entry, RemovalPolicyNode * node);
47  void (*Remove) (RemovalPolicy * policy, StoreEntry * entry, RemovalPolicyNode * node);
48  void (*Referenced) (RemovalPolicy * policy, const StoreEntry * entry, RemovalPolicyNode * node);
49  void (*Dereferenced) (RemovalPolicy * policy, const StoreEntry * entry, RemovalPolicyNode * node);
50  RemovalPolicyWalker *(*WalkInit) (RemovalPolicy * policy);
51  RemovalPurgeWalker *(*PurgeInit) (RemovalPolicy * policy, int max_scan);
52  void (*Stats) (RemovalPolicy * policy, StoreEntry * entry);
53 };
54 
56 {
58 
59 public:
61  void *_data;
62  const StoreEntry *(*Next) (RemovalPolicyWalker * walker);
63  void (*Done) (RemovalPolicyWalker * walker);
64 };
65 
67 {
69 
70 public:
72  void *_data;
74  StoreEntry *(*Next) (RemovalPurgeWalker * walker);
75  void (*Done) (RemovalPurgeWalker * walker);
76 };
77 
79 
81 
82 #endif /* SQUID_REMOVALPOLICY_H */
83 
RemovalPolicy * createRemovalPolicy(RemovalPolicySettings *settings)
Definition: store.cc:1727
const char * _type
Definition: RemovalPolicy.h:40
void(* Done)(RemovalPurgeWalker *walker)
Definition: RemovalPolicy.h:75
void(* Stats)(RemovalPolicy *policy, StoreEntry *entry)
Definition: RemovalPolicy.h:52
RemovalPolicy * REMOVALPOLICYCREATE(wordlist *args)
Definition: RemovalPolicy.h:80
Definition: parse.c:104
void(* Referenced)(RemovalPolicy *policy, const StoreEntry *entry, RemovalPolicyNode *node)
Definition: RemovalPolicy.h:48
#define CBDATA_CLASS(type)
Definition: cbdata.h:302
void(* Add)(RemovalPolicy *policy, StoreEntry *entry, RemovalPolicyNode *node)
Definition: RemovalPolicy.h:46
void(* Free)(RemovalPolicy *policy)
Definition: RemovalPolicy.h:45
RemovalPolicy * _policy
Definition: RemovalPolicy.h:68
void(* Dereferenced)(RemovalPolicy *policy, const StoreEntry *entry, RemovalPolicyNode *node)
Definition: RemovalPolicy.h:49
void(* Remove)(RemovalPolicy *policy, StoreEntry *entry, RemovalPolicyNode *node)
Definition: RemovalPolicy.h:47
RemovalPolicy * _policy
Definition: RemovalPolicy.h:57
#define NULL
Definition: types.h:166
void(* Done)(RemovalPolicyWalker *walker)
Definition: RemovalPolicy.h:63

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors