]> git.ipfire.org Git - thirdparty/squid.git/blame_incremental - src/DiskIO/DiskThreads/DiskThreadsIOStrategy.h
Source Format Enforcement (#763)
[thirdparty/squid.git] / src / DiskIO / DiskThreads / DiskThreadsIOStrategy.h
... / ...
CommitLineData
1/*
2 * Copyright (C) 1996-2021 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/* DEBUG: section 79 Squid-side Disk I/O functions. */
10
11#ifndef __STORE_DISKTHREADEDIOSTRATEGY_H__
12#define __STORE_DISKTHREADEDIOSTRATEGY_H__
13
14#define _AIO_OPEN 0
15#define _AIO_READ 1
16#define _AIO_WRITE 2
17#define _AIO_CLOSE 3
18#define _AIO_UNLINK 4
19#define _AIO_OPENDIR 5
20#define _AIO_STAT 6
21#include "DiskIO/DiskIOStrategy.h"
22
23class DiskThreadsIOStrategy : public DiskIOStrategy
24{
25
26public:
27 DiskThreadsIOStrategy();
28 virtual bool shedLoad();
29 virtual int load();
30 virtual RefCount<DiskFile> newFile(char const *path);
31 virtual bool unlinkdUseful() const;
32 virtual void unlinkFile (char const *);
33 virtual int callback();
34 virtual void sync();
35 virtual void init();
36 void done();
37 /* Todo: add access limitations */
38 bool initialised;
39 static DiskThreadsIOStrategy Instance;
40
41private:
42 static void aioStats(StoreEntry * sentry);
43 void registerWithCacheManager(void);
44};
45
46#endif
47