StoreIOState Class Referenceabstract

#include <StoreIOState.h>

Inheritance diagram for StoreIOState:
Collaboration diagram for StoreIOState:

Public Types

enum  CloseHow {
  wroteAll,
  writerGone,
  readerDone
}
 
typedef RefCount< StoreIOStatePointer
 
typedef void STRCB (void *their_data, const char *buf, ssize_t len, StoreIOState::Pointer self)
 
typedef void STFNCB (void *their_data, int errflag, StoreIOState::Pointer self)
 
typedef void STIOCB (void *their_data, int errflag, StoreIOState::Pointer self)
 

Public Member Functions

void * operator new (size_t amount)
 
void operator delete (void *address)
 
 StoreIOState (StoreIOState::STFNCB *cbFile, StoreIOState::STIOCB *cbIo, void *data)
 
virtual ~StoreIOState ()
 
off_t offset () const
 
virtual void read_ (char *buf, size_t size, off_t offset, STRCB *callback, void *callback_data)=0
 
virtual bool write (char const *buf, size_t size, off_t offset, FREE *free_func)=0
 
virtual void close (int how)=0
 finish or abort swapping per CloseHow More...
 
bool touchingStoreEntry () const
 

Public Attributes

sdirno swap_dirn
 
sfileno swap_filen
 
StoreEntrye
 
mode_t mode
 
off_t offset_
 number of bytes written or read for this entry so far More...
 
STFNCBfile_callback
 
STIOCBcallback
 
void * callback_data
 
struct {
   STRCB *   callback
 
   void *   callback_data
 
read
 
struct {
   bool   closing
 
flags
 

Detailed Description

Definition at line 17 of file StoreIOState.h.

Member Typedef Documentation

Definition at line 21 of file StoreIOState.h.

typedef void StoreIOState::STFNCB(void *their_data, int errflag, StoreIOState::Pointer self)

Definition at line 41 of file StoreIOState.h.

typedef void StoreIOState::STIOCB(void *their_data, int errflag, StoreIOState::Pointer self)

Definition at line 51 of file StoreIOState.h.

typedef void StoreIOState::STRCB(void *their_data, const char *buf, ssize_t len, StoreIOState::Pointer self)

Definition at line 29 of file StoreIOState.h.

Member Enumeration Documentation

Enumerator
wroteAll 

success: caller supplied all data it wanted to swap out

writerGone 

failure: caller left before swapping out everything

readerDone 

success or failure: either way, stop swapping in

Definition at line 69 of file StoreIOState.h.

Constructor & Destructor Documentation

StoreIOState::StoreIOState ( StoreIOState::STFNCB cbFile,
StoreIOState::STIOCB cbIo,
void *  data 
)

Definition at line 30 of file StoreIOState.cc.

References flags, NULL, and read.

StoreIOState::~StoreIOState ( )
virtual

Definition at line 45 of file StoreIOState.cc.

References callback_data, cbdataReferenceDone, debugs, and read.

Member Function Documentation

virtual void StoreIOState::close ( int  how)
pure virtual

Implemented in Rock::IoState, and Fs::Ufs::UFSStoreState.

Referenced by storeClose().

off_t StoreIOState::offset ( ) const
inline
void StoreIOState::operator delete ( void *  address)

Definition at line 25 of file StoreIOState.cc.

References assert.

void * StoreIOState::operator new ( size_t  amount)

Definition at line 18 of file StoreIOState.cc.

References assert.

virtual void StoreIOState::read_ ( char *  buf,
size_t  size,
off_t  offset,
STRCB callback,
void *  callback_data 
)
pure virtual

Implemented in Fs::Ufs::UFSStoreState, and Rock::IoState.

Referenced by storeRead().

bool StoreIOState::touchingStoreEntry ( ) const

Definition at line 56 of file StoreIOState.cc.

References e, swap_filen, and StoreEntry::swap_filen.

Referenced by Rock::SwapDir::writeCompleted(), and Rock::SwapDir::writeError().

virtual bool StoreIOState::write ( char const *  buf,
size_t  size,
off_t  offset,
FREE free_func 
)
pure virtual

write the given buffer and free it when it is no longer needed

Parameters
offsetzero for the very first write and -1 for all other writes
Return values
falseif write failed (callback has been or will be called)

Implemented in Fs::Ufs::UFSStoreState, and Rock::IoState.

Referenced by doPages(), and storeIOWrite().

Member Data Documentation

STIOCB* StoreIOState::callback

Definition at line 89 of file StoreIOState.h.

STRCB* StoreIOState::callback

Definition at line 93 of file StoreIOState.h.

void* StoreIOState::callback_data

Definition at line 90 of file StoreIOState.h.

Referenced by ~StoreIOState().

bool StoreIOState::closing

Definition at line 98 of file StoreIOState.h.

Referenced by storeClose().

STFNCB* StoreIOState::file_callback

Definition at line 88 of file StoreIOState.h.

struct { ... } StoreIOState::flags

Referenced by storeClose(), and StoreIOState().

off_t StoreIOState::offset_
struct { ... } StoreIOState::read

Referenced by StoreIOState(), and ~StoreIOState().


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors