#include <DiskdFile.h>

Inheritance diagram for DiskdFile:
Collaboration diagram for DiskdFile:

Public Types

typedef RefCount< DiskFilePointer
 

Public Member Functions

 DiskdFile (char const *path, DiskdIOStrategy *)
 
 ~DiskdFile () override
 
void open (int flags, mode_t aMode, RefCount< IORequestor > callback) override
 
void create (int flags, mode_t aMode, RefCount< IORequestor > callback) override
 
void read (ReadRequest *) override
 
void write (WriteRequest *) override
 
void close () override
 
bool error () const override
 
bool canRead () const override
 
bool ioInProgress () const override
 
int getID () const
 
void completed (diomsg *)
 
virtual void configure (const Config &)
 notes supported configuration options; kids must call this first More...
 
virtual bool canWrite () const
 
virtual int getFD () const
 

Private Member Functions

 CBDATA_CLASS (DiskdFile)
 
void openDone (diomsg *)
 
void createDone (diomsg *)
 
void readDone (diomsg *)
 
void writeDone (diomsg *)
 
void closeDone (diomsg *)
 
void notifyClient ()
 
bool canNotifyClient () const
 
void ioAway ()
 
void ioCompleted ()
 

Private Attributes

int id
 
char const * path_
 
bool errorOccured
 
DiskdIOStrategyIO
 
RefCount< IORequestorioRequestor
 
int mode
 
size_t inProgressIOs
 

Detailed Description

Definition at line 24 of file DiskdFile.h.

Member Typedef Documentation

◆ Pointer

typedef RefCount<DiskFile> DiskFile::Pointer
inherited

Definition at line 39 of file DiskFile.h.

Constructor & Destructor Documentation

◆ DiskdFile()

DiskdFile::DiskdFile ( char const *  path,
DiskdIOStrategy anIO 
)

Definition at line 33 of file DiskdFile.cc.

References assert, debugs, diskd_stats, path_, diskd_stats_t::sio_id, and xstrdup.

◆ ~DiskdFile()

DiskdFile::~DiskdFile ( )
override

Definition at line 46 of file DiskdFile.cc.

References assert, inProgressIOs, path_, and safe_free.

Member Function Documentation

◆ canNotifyClient()

bool DiskdFile::canNotifyClient ( ) const
private

Definition at line 187 of file DiskdFile.cc.

References debugs, RefCount< C >::getRaw(), and ioRequestor.

Referenced by closeDone(), and notifyClient().

◆ canRead()

bool DiskdFile::canRead ( ) const
overridevirtual

Implements DiskFile.

Definition at line 181 of file DiskdFile.cc.

References error().

◆ canWrite()

virtual bool DiskFile::canWrite ( ) const
inlinevirtualinherited

Reimplemented in DiskThreadsDiskFile, IpcIoFile, and MmappedFile.

Definition at line 50 of file DiskFile.h.

◆ CBDATA_CLASS()

DiskdFile::CBDATA_CLASS ( DiskdFile  )
private

◆ close()

◆ closeDone()

◆ completed()

◆ configure()

virtual void DiskFile::configure ( const Config )
inlinevirtualinherited

Reimplemented in IpcIoFile.

Definition at line 42 of file DiskFile.h.

Referenced by IpcIoFile::configure().

◆ create()

◆ createDone()

◆ error()

bool DiskdFile::error ( ) const
overridevirtual

Implements DiskFile.

Definition at line 175 of file DiskdFile.cc.

References errorOccured.

Referenced by canRead().

◆ getFD()

virtual int DiskFile::getFD ( ) const
inlinevirtualinherited

During migration only

Reimplemented in BlockingFile, DiskThreadsDiskFile, IpcIoFile, and MmappedFile.

Definition at line 53 of file DiskFile.h.

◆ getID()

int DiskdFile::getID ( ) const
inline

Definition at line 41 of file DiskdFile.h.

References id.

◆ ioAway()

void DiskdFile::ioAway ( )
private

Definition at line 314 of file DiskdFile.cc.

References inProgressIOs.

Referenced by close(), create(), open(), read(), and write().

◆ ioCompleted()

void DiskdFile::ioCompleted ( )
private

Definition at line 320 of file DiskdFile.cc.

References inProgressIOs.

Referenced by close(), closeDone(), create(), createDone(), open(), openDone(), read(), readDone(), write(), and writeDone().

◆ ioInProgress()

bool DiskdFile::ioInProgress ( ) const
overridevirtual

Inform callers if there is IO in progress

Implements DiskFile.

Definition at line 404 of file DiskdFile.cc.

References inProgressIOs.

◆ notifyClient()

void DiskdFile::notifyClient ( )
private

◆ open()

◆ openDone()

◆ read()

◆ readDone()

◆ write()

◆ writeDone()

Member Data Documentation

◆ errorOccured

bool DiskdFile::errorOccured
private

◆ id

int DiskdFile::id
private

Definition at line 46 of file DiskdFile.h.

Referenced by getID().

◆ inProgressIOs

size_t DiskdFile::inProgressIOs
private

Definition at line 61 of file DiskdFile.h.

Referenced by ~DiskdFile(), ioAway(), ioCompleted(), and ioInProgress().

◆ IO

DiskdIOStrategy* DiskdFile::IO
private

Definition at line 49 of file DiskdFile.h.

Referenced by close(), create(), open(), read(), readDone(), and write().

◆ ioRequestor

RefCount<IORequestor> DiskdFile::ioRequestor
private

◆ mode

int DiskdFile::mode
private

Definition at line 56 of file DiskdFile.h.

Referenced by create(), and open().

◆ path_

char const* DiskdFile::path_
private

Definition at line 47 of file DiskdFile.h.

Referenced by DiskdFile(), ~DiskdFile(), create(), and open().


The documentation for this class was generated from the following files:

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors