#include <MmappedFile.h>

Inheritance diagram for MmappedFile:
Collaboration diagram for MmappedFile:

Public Types

typedef RefCount< DiskFilePointer
 

Public Member Functions

 MmappedFile (char const *path)
 
 ~MmappedFile () override
 
void open (int flags, mode_t mode, RefCount< IORequestor > callback) override
 
void create (int flags, mode_t mode, RefCount< IORequestor > callback) override
 
void read (ReadRequest *) override
 
void write (WriteRequest *) override
 
void close () override
 
bool error () const override
 
int getFD () const override
 
bool canRead () const override
 
bool canWrite () const override
 
bool ioInProgress () const override
 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

◆ Pointer

typedef RefCount<DiskFile> DiskFile::Pointer
inherited

Definition at line 39 of file DiskFile.h.

Constructor & Destructor Documentation

◆ MmappedFile()

MmappedFile::MmappedFile ( char const *  path)

Definition at line 56 of file MmappedFile.cc.

References assert, debugs, path_, and xstrdup.

◆ ~MmappedFile()

MmappedFile::~MmappedFile ( )
override

Definition at line 64 of file MmappedFile.cc.

References doClose(), path_, and safe_free.

Member Function Documentation

◆ canRead()

bool MmappedFile::canRead ( ) const
overridevirtual

Implements DiskFile.

Definition at line 127 of file MmappedFile.cc.

References fd.

◆ canWrite()

bool MmappedFile::canWrite ( ) const
overridevirtual

Reimplemented from DiskFile.

Definition at line 133 of file MmappedFile.cc.

References fd.

◆ CBDATA_CLASS()

MmappedFile::CBDATA_CLASS ( MmappedFile  )
private

◆ close()

void MmappedFile::close ( )
overridevirtual

Implements DiskFile.

Definition at line 118 of file MmappedFile.cc.

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

◆ configure()

virtual void DiskFile::configure ( const Config )
inlinevirtualinherited

Reimplemented in IpcIoFile.

Definition at line 42 of file DiskFile.h.

Referenced by IpcIoFile::configure().

◆ create()

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

Alias for MmappedFile::open(...)

Implements DiskFile.

Definition at line 102 of file MmappedFile.cc.

References open().

◆ doClose()

void MmappedFile::doClose ( )
private

Definition at line 108 of file MmappedFile.cc.

References fd, file_close(), and store_open_disk_fd.

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

◆ error()

bool MmappedFile::error ( ) const
overridevirtual

Implements DiskFile.

Definition at line 139 of file MmappedFile.cc.

References error_.

◆ getFD()

int MmappedFile::getFD ( ) const
inlineoverridevirtual

During migration only

Reimplemented from DiskFile.

Definition at line 29 of file MmappedFile.h.

References fd.

◆ ioInProgress()

bool MmappedFile::ioInProgress ( ) const
overridevirtual

Implements DiskFile.

Definition at line 215 of file MmappedFile.cc.

◆ open()

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

◆ read()

◆ write()

Member Data Documentation

◆ error_

bool MmappedFile::error_
private

Definition at line 46 of file MmappedFile.h.

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

◆ fd

int MmappedFile::fd
private

Definition at line 40 of file MmappedFile.h.

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

◆ ioRequestor

RefCount<IORequestor> MmappedFile::ioRequestor
private

Definition at line 37 of file MmappedFile.h.

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

◆ maxOffset

int64_t MmappedFile::maxOffset
private

Definition at line 44 of file MmappedFile.h.

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

◆ minOffset

int64_t MmappedFile::minOffset
private

Definition at line 43 of file MmappedFile.h.

Referenced by read(), and write().

◆ path_

char const* MmappedFile::path_
private

Definition at line 36 of file MmappedFile.h.

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


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors