DiskdFile.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/* DEBUG: section 79 Squid-side DISKD I/O functions. */
10
11#ifndef __STORE_DISKDFILE_H__
12#define __STORE_DISKDFILE_H__
13
14#include "cbdata.h"
15#include "DiskIO/DiskFile.h"
16
17class DiskdIOStrategy;
18
19struct diomsg;
20
24class DiskdFile : public DiskFile
25{
27
28public:
29 DiskdFile(char const *path, DiskdIOStrategy *);
30 ~DiskdFile() override;
31 void open(int flags, mode_t aMode, RefCount<IORequestor> callback) override;
32 void create(int flags, mode_t aMode, RefCount<IORequestor> callback) override;
33 void read(ReadRequest *) override;
34 void write(WriteRequest *) override;
35 void close() override;
36 bool error() const override;
37 bool canRead() const override;
38 bool ioInProgress() const override;
39
40 /* Temporary */
41 int getID() const {return id;}
42
43 void completed(diomsg *);
44
45private:
46 int id;
47 char const *path_;
51 void openDone(diomsg *);
52 void createDone (diomsg *);
53 void readDone (diomsg *);
54 void writeDone (diomsg *);
55 void closeDone (diomsg *);
56 int mode;
57 void notifyClient();
58 bool canNotifyClient() const;
59 void ioAway();
60 void ioCompleted();
62};
63
64#endif
65
void closeDone(diomsg *)
Definition: DiskdFile.cc:326
bool errorOccured
Definition: DiskdFile.h:48
int mode
Definition: DiskdFile.h:56
void open(int flags, mode_t aMode, RefCount< IORequestor > callback) override
Definition: DiskdFile.cc:53
void ioCompleted()
Definition: DiskdFile.cc:320
RefCount< IORequestor > ioRequestor
Definition: DiskdFile.h:50
bool canNotifyClient() const
Definition: DiskdFile.cc:187
void writeDone(diomsg *)
Definition: DiskdFile.cc:376
void openDone(diomsg *)
Definition: DiskdFile.cc:245
bool canRead() const override
Definition: DiskdFile.cc:181
bool ioInProgress() const override
Definition: DiskdFile.cc:404
void completed(diomsg *)
Definition: DiskdFile.cc:208
DiskdIOStrategy * IO
Definition: DiskdFile.h:49
char const * path_
Definition: DiskdFile.h:47
bool error() const override
Definition: DiskdFile.cc:175
void readDone(diomsg *)
Definition: DiskdFile.cc:347
size_t inProgressIOs
Definition: DiskdFile.h:61
void read(ReadRequest *) override
Definition: DiskdFile.cc:118
void create(int flags, mode_t aMode, RefCount< IORequestor > callback) override
Definition: DiskdFile.cc:84
void close() override
Definition: DiskdFile.cc:148
~DiskdFile() override
Definition: DiskdFile.cc:46
void write(WriteRequest *) override
Definition: DiskdFile.cc:279
void notifyClient()
Definition: DiskdFile.cc:198
int getID() const
Definition: DiskdFile.h:41
int id
Definition: DiskdFile.h:46
void createDone(diomsg *)
Definition: DiskdFile.cc:262
DiskdFile(char const *path, DiskdIOStrategy *)
Definition: DiskdFile.cc:33
void ioAway()
Definition: DiskdFile.cc:314
CBDATA_CLASS(DiskdFile)
Definition: diomsg.h:30
unsigned short mode_t
Definition: types.h:129

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors