RemovalPolicy.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2023 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
16class wordlist;
17class StoreEntry;
18
20{
21
22public:
23 RemovalPolicySettings() : type(nullptr), args(nullptr) {};
24
25 char *type;
27};
28
30{
31
32public:
33 RemovalPolicyNode() : data(nullptr) {}
34
35 void *data;
36};
37
39{
41
42public:
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
59public:
61 void *_data;
62 const StoreEntry *(*Next) (RemovalPolicyWalker * walker);
63 void (*Done) (RemovalPolicyWalker * walker);
64};
65
67{
69
70public:
72 void *_data;
74 StoreEntry *(*Next) (RemovalPurgeWalker * walker);
75 void (*Done) (RemovalPurgeWalker * walker);
76};
77
79
81
82#endif /* SQUID_REMOVALPOLICY_H */
83
RemovalPolicy * REMOVALPOLICYCREATE(wordlist *args)
Definition: RemovalPolicy.h:80
RemovalPolicy * createRemovalPolicy(RemovalPolicySettings *settings)
Definition: store.cc:1657
#define CBDATA_CLASS(type)
Definition: cbdata.h:289
void(* Done)(RemovalPolicyWalker *walker)
Definition: RemovalPolicy.h:63
RemovalPolicy * _policy
Definition: RemovalPolicy.h:60
const char * _type
Definition: RemovalPolicy.h:43
void(* Free)(RemovalPolicy *policy)
Definition: RemovalPolicy.h:45
void(* Referenced)(RemovalPolicy *policy, const StoreEntry *entry, RemovalPolicyNode *node)
Definition: RemovalPolicy.h:48
void(* Add)(RemovalPolicy *policy, StoreEntry *entry, RemovalPolicyNode *node)
Definition: RemovalPolicy.h:46
void(* Stats)(RemovalPolicy *policy, StoreEntry *entry)
Definition: RemovalPolicy.h:52
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
void(* Done)(RemovalPurgeWalker *walker)
Definition: RemovalPolicy.h:75
RemovalPolicy * _policy
Definition: RemovalPolicy.h:71
Definition: parse.c:104

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors