AIODiskIOStrategy.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_SRC_DISKIO_AIO_AIODISKIOSTRATEGY_H
10#define SQUID_SRC_DISKIO_AIO_AIODISKIOSTRATEGY_H
11
12#if HAVE_DISKIO_MODULE_AIO
13
14#include "DiskIO/AIO/async_io.h"
16
17class AIODiskIOStrategy : public DiskIOStrategy
18{
19
20public:
21 AIODiskIOStrategy();
22 ~AIODiskIOStrategy() override;
23
24 bool shedLoad() override;
25 /* What is the current load? 999 = 99.9% */
26 int load() override;
27 /* Return a handle for performing IO operations */
28 RefCount<DiskFile> newFile (char const *path) override;
29 /* flush all IO operations */
30 void sync() override;
32 bool unlinkdUseful() const override;
33 /* unlink a file by path */
34 void unlinkFile (char const *) override;
35
36 /* perform any pending callbacks */
37 int callback() override;
38
39 /* Init per-instance logic */
40 void init() override;
41
42 /* cachemgr output on the IO instance stats */
43 void statfs(StoreEntry & sentry)const override;
44 /* module specific options */
45 ConfigOption *getOptionTree() const override;
46 /* a file descriptor */
47 int fd;
48 /* queue of requests */
49 async_queue_t aq;
50
51 int findSlot();
52};
53
54#endif /* HAVE_DISKIO_MODULE_AIO */
55#endif /* SQUID_SRC_DISKIO_AIO_AIODISKIOSTRATEGY_H */
56
virtual int load()=0
virtual int callback()
virtual void sync()
virtual void statfs(StoreEntry &) const
virtual bool unlinkdUseful() const =0
virtual RefCount< DiskFile > newFile(char const *path)=0
virtual bool shedLoad()=0
virtual void init()
virtual ConfigOption * getOptionTree() const
virtual void unlinkFile(char const *)=0

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors