#include <MmappedFile.h>

Inheritance diagram for MmappedFile:
Collaboration diagram for MmappedFile:

Public Types

typedef RefCount< DiskFilePointer
 

Public Member Functions

 MmappedFile (char const *path)
 
 ~MmappedFile ()
 
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
 we only support blocking I/O More...
 
virtual void configure (const Config &)
 notes supported configuration options; kids must call this first More...
 

Private Member Functions

 CBDATA_CLASS (MmappedFile)
 
void doClose ()
 

Private Attributes

char const * path_
 
RefCount< IORequestorioRequestor
 
int fd
 
int64_t minOffset
 enforced if not negative (to preserve file headers) More...
 
int64_t maxOffset
 enforced if not negative (to avoid crashes) More...
 
bool error_
 

Detailed Description

Definition at line 16 of file MmappedFile.h.

Member Typedef Documentation

typedef RefCount<DiskFile> DiskFile::Pointer
inherited

Definition at line 39 of file DiskFile.h.

Constructor & Destructor Documentation

MmappedFile::MmappedFile ( char const *  path)

Definition at line 56 of file MmappedFile.cc.

References assert, debugs, HERE(), path_, and xstrdup.

MmappedFile::~MmappedFile ( )

Definition at line 64 of file MmappedFile.cc.

References doClose(), path_, and safe_free.

Member Function Documentation

bool MmappedFile::canRead ( ) const
virtual

Implements DiskFile.

Definition at line 127 of file MmappedFile.cc.

References fd.

bool MmappedFile::canWrite ( ) const
virtual

Reimplemented from DiskFile.

Definition at line 133 of file MmappedFile.cc.

References fd.

MmappedFile::CBDATA_CLASS ( MmappedFile  )
private
void MmappedFile::close ( )
virtual

Implements DiskFile.

Definition at line 118 of file MmappedFile.cc.

References assert, IORequestor::closeCompleted(), debugs, doClose(), HERE(), ioRequestor, and NULL.

virtual void DiskFile::configure ( const Config )
inlinevirtualinherited

Reimplemented in IpcIoFile.

Definition at line 42 of file DiskFile.h.

Referenced by IpcIoFile::configure().

void MmappedFile::create ( int  flags,
mode_t  mode,
RefCount< IORequestor callback 
)
virtual

Alias for MmappedFile::open(...)

Implements DiskFile.

Definition at line 102 of file MmappedFile.cc.

References open().

void MmappedFile::doClose ( )
private

Definition at line 108 of file MmappedFile.cc.

References fd, file_close(), and store_open_disk_fd.

Referenced by close(), write(), and ~MmappedFile().

bool MmappedFile::error ( ) const
virtual

Implements DiskFile.

Definition at line 139 of file MmappedFile.cc.

References error_.

virtual int MmappedFile::getFD ( ) const
inlinevirtual

During migration only

Reimplemented from DiskFile.

Definition at line 29 of file MmappedFile.h.

References fd.

bool MmappedFile::ioInProgress ( ) const
virtual

Implements DiskFile.

Definition at line 215 of file MmappedFile.cc.

void MmappedFile::open ( int  flags,
mode_t  mode,
RefCount< IORequestor callback 
)
virtual

Member Data Documentation

bool MmappedFile::error_
private

Definition at line 46 of file MmappedFile.h.

Referenced by error(), open(), read(), and write().

int MmappedFile::fd
private

Definition at line 40 of file MmappedFile.h.

Referenced by canRead(), canWrite(), doClose(), getFD(), open(), read(), and write().

RefCount<IORequestor> MmappedFile::ioRequestor
private

Definition at line 37 of file MmappedFile.h.

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

int64_t MmappedFile::maxOffset
private

Definition at line 44 of file MmappedFile.h.

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

int64_t MmappedFile::minOffset
private

Definition at line 43 of file MmappedFile.h.

Referenced by read(), and write().

char const* MmappedFile::path_
private

Definition at line 36 of file MmappedFile.h.

Referenced by MmappedFile(), open(), and ~MmappedFile().


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors