]> git.ipfire.org Git - thirdparty/squid.git/blame - src/DiskIO/DiskThreads/DiskThreadsIOStrategy.h
Source Format Enforcement (#763)
[thirdparty/squid.git] / src / DiskIO / DiskThreads / DiskThreadsIOStrategy.h
CommitLineData
59b2d47f 1/*
f70aedc4 2 * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
26ac0430 3 *
bbc27441
AJ
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.
59b2d47f 7 */
8
bbc27441
AJ
9/* DEBUG: section 79 Squid-side Disk I/O functions. */
10
b9ae18aa 11#ifndef __STORE_DISKTHREADEDIOSTRATEGY_H__
12#define __STORE_DISKTHREADEDIOSTRATEGY_H__
59b2d47f 13
f53969cc
SM
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
b9ae18aa 21#include "DiskIO/DiskIOStrategy.h"
59b2d47f 22
b9ae18aa 23class DiskThreadsIOStrategy : public DiskIOStrategy
59b2d47f 24{
25
26public:
b9ae18aa 27 DiskThreadsIOStrategy();
28 virtual bool shedLoad();
29 virtual int load();
30 virtual RefCount<DiskFile> newFile(char const *path);
c521ad17 31 virtual bool unlinkdUseful() const;
b9ae18aa 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;
59b2d47f 40
b9ae18aa 41private:
42 static void aioStats(StoreEntry * sentry);
6fdc2d18 43 void registerWithCacheManager(void);
59b2d47f 44};
45
b9ae18aa 46#endif
f53969cc 47