#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 ()
 
virtual void open (int flags, mode_t aMode, RefCount< IORequestor > callback)
 
virtual void create (int flags, mode_t aMode, RefCount< IORequestor > callback)
 
virtual void read (ReadRequest *)
 
virtual void write (WriteRequest *)
 
virtual void close ()
 
virtual bool error () const
 
virtual bool canRead () const
 
virtual bool ioInProgress () const
 
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 ( )

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
virtual

Implements DiskFile.

Definition at line 181 of file DiskdFile.cc.

References error().

◆ canWrite()

virtual bool DiskFile::canWrite ( ) const
inlinevirtualinherited

◆ CBDATA_CLASS()

DiskdFile::CBDATA_CLASS ( DiskdFile  )
private

◆ close()

◆ closeDone()

◆ completed()

◆ configure()

virtual void DiskFile::configure ( const Config )
inlinevirtualinherited

◆ create()

◆ createDone()

◆ error()

bool DiskdFile::error ( ) const
virtual

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 IpcIoFile, BlockingFile, DiskThreadsDiskFile, and MmappedFile.

Definition at line 53 of file DiskFile.h.

References DiskFile::error(), and DiskFile::ioInProgress().

◆ getID()

int DiskdFile::getID ( ) const
inline

Definition at line 41 of file DiskdFile.h.

References completed(), and 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
virtual

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 ioAway(), ioCompleted(), ioInProgress(), and ~DiskdFile().

◆ 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 create(), DiskdFile(), open(), and ~DiskdFile().


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors