#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

typedef RefCount<DiskFile> DiskFile::Pointer
inherited

Definition at line 39 of file DiskFile.h.

Constructor & Destructor Documentation

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 ( )

Definition at line 46 of file DiskdFile.cc.

References assert, inProgressIOs, path_, and safe_free.

Member Function Documentation

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().

bool DiskdFile::canRead ( ) const
virtual

Implements DiskFile.

Definition at line 181 of file DiskdFile.cc.

References error().

virtual bool DiskFile::canWrite ( ) const
inlinevirtualinherited

Reimplemented in IpcIoFile, DiskThreadsDiskFile, and MmappedFile.

Definition at line 50 of file DiskFile.h.

DiskdFile::CBDATA_CLASS ( DiskdFile  )
private
virtual void DiskFile::configure ( const Config )
inlinevirtualinherited

Reimplemented in IpcIoFile.

Definition at line 42 of file DiskFile.h.

Referenced by IpcIoFile::configure().

bool DiskdFile::error ( ) const
virtual

Implements DiskFile.

Definition at line 175 of file DiskdFile.cc.

References errorOccured.

Referenced by canRead().

virtual int DiskFile::getFD ( ) const
inlinevirtualinherited

During migration only

Reimplemented in IpcIoFile, BlockingFile, DiskThreadsDiskFile, and MmappedFile.

Definition at line 53 of file DiskFile.h.

int DiskdFile::getID ( ) const
inline

Definition at line 41 of file DiskdFile.h.

References id.

void DiskdFile::ioAway ( )
private

Definition at line 314 of file DiskdFile.cc.

References inProgressIOs.

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

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().

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.

void DiskdFile::notifyClient ( )
private

Member Data Documentation

bool DiskdFile::errorOccured
private
int DiskdFile::id
private

Definition at line 46 of file DiskdFile.h.

Referenced by getID().

size_t DiskdFile::inProgressIOs
private

Definition at line 61 of file DiskdFile.h.

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

DiskdIOStrategy* DiskdFile::IO
private

Definition at line 49 of file DiskdFile.h.

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

RefCount<IORequestor> DiskdFile::ioRequestor
private
int DiskdFile::mode
private

Definition at line 56 of file DiskdFile.h.

Referenced by create(), and open().

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