#include <DiskThreadsDiskFile.h>

Inheritance diagram for DiskThreadsDiskFile:
Collaboration diagram for DiskThreadsDiskFile:

Public Types

typedef RefCount< DiskFilePointer
 

Public Member Functions

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

Private Member Functions

 CBDATA_CLASS (DiskThreadsDiskFile)
 
void openDone (int fd, const char *buf, int aio_return, int aio_errno)
 
void doClose ()
 
void readDone (int fd, const char *buf, int len, int errflag, RefCount< ReadRequest > request)
 
void writeDone (int fd, int errflag, size_t len, RefCount< WriteRequest > request)
 

Private Attributes

int fd
 
bool errorOccured
 
char const * path_
 
DiskThreadsIOStrategyIO
 
size_t inProgressIOs
 
RefCount< IORequestorioRequestor
 

Static Private Attributes

static AIOCB ReadDone
 
static DWCB WriteDone
 
static AIOCB OpenDone
 

Detailed Description

Definition at line 19 of file DiskThreadsDiskFile.h.

Member Typedef Documentation

typedef RefCount<DiskFile> DiskFile::Pointer
inherited

Definition at line 39 of file DiskFile.h.

Constructor & Destructor Documentation

DiskThreadsDiskFile::DiskThreadsDiskFile ( char const *  path,
DiskThreadsIOStrategy anIO 
)

Definition at line 29 of file DiskThreadsDiskFile.cc.

References assert, debugs, path_, and xstrdup.

DiskThreadsDiskFile::~DiskThreadsDiskFile ( )

Definition at line 37 of file DiskThreadsDiskFile.cc.

References doClose(), path_, and safe_free.

Member Function Documentation

bool DiskThreadsDiskFile::canRead ( ) const
virtual

Implements DiskFile.

Definition at line 198 of file DiskThreadsDiskFile.cc.

References debugs.

bool DiskThreadsDiskFile::canWrite ( ) const
virtual

Reimplemented from DiskFile.

Definition at line 222 of file DiskThreadsDiskFile.cc.

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

Reimplemented in IpcIoFile.

Definition at line 42 of file DiskFile.h.

Referenced by IpcIoFile::configure().

void DiskThreadsDiskFile::create ( int  flags,
mode_t  mode,
RefCount< IORequestor callback 
)
virtual
void DiskThreadsDiskFile::doClose ( )
private
bool DiskThreadsDiskFile::error ( ) const
virtual

Implements DiskFile.

Definition at line 125 of file DiskThreadsDiskFile.cc.

References errorOccured.

virtual int DiskThreadsDiskFile::getFD ( ) const
inlinevirtual

During migration only

Reimplemented from DiskFile.

Definition at line 32 of file DiskThreadsDiskFile.h.

References fd.

bool DiskThreadsDiskFile::ioInProgress ( ) const
virtual

Inform callers if there is IO in progress

Implements DiskFile.

Definition at line 228 of file DiskThreadsDiskFile.cc.

References inProgressIOs.

Referenced by close().

void DiskThreadsDiskFile::open ( int  flags,
mode_t  mode,
RefCount< IORequestor callback 
)
virtual
void DiskThreadsDiskFile::openDone ( int  fd,
const char *  buf,
int  aio_return,
int  aio_errno 
)
private
void DiskThreadsDiskFile::readDone ( int  fd,
const char *  buf,
int  len,
int  errflag,
RefCount< ReadRequest request 
)
private
void DiskThreadsDiskFile::writeDone ( int  fd,
int  errflag,
size_t  len,
RefCount< WriteRequest request 
)
private

Member Data Documentation

bool DiskThreadsDiskFile::errorOccured
private

Definition at line 55 of file DiskThreadsDiskFile.h.

Referenced by create(), error(), open(), and openDone().

int DiskThreadsDiskFile::fd
private

Definition at line 54 of file DiskThreadsDiskFile.h.

Referenced by create(), getFD(), open(), and read().

size_t DiskThreadsDiskFile::inProgressIOs
private

Definition at line 58 of file DiskThreadsDiskFile.h.

Referenced by create(), ioInProgress(), open(), openDone(), read(), readDone(), write(), and writeDone().

DiskThreadsIOStrategy* DiskThreadsDiskFile::IO
private

Definition at line 57 of file DiskThreadsDiskFile.h.

RefCount<IORequestor> DiskThreadsDiskFile::ioRequestor
private

Definition at line 61 of file DiskThreadsDiskFile.h.

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

void DiskThreadsDiskFile::OpenDone
staticprivate

Definition at line 59 of file DiskThreadsDiskFile.h.

Referenced by create(), and open().

char const* DiskThreadsDiskFile::path_
private
void DiskThreadsDiskFile::ReadDone
staticprivate

Definition at line 41 of file DiskThreadsDiskFile.h.

Referenced by read().

void DiskThreadsDiskFile::WriteDone
staticprivate

Definition at line 51 of file DiskThreadsDiskFile.h.

Referenced by write().


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors