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

◆ Pointer

Definition at line 21 of file StoreIOState.h.

◆ STFNCB

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

Definition at line 41 of file StoreIOState.h.

◆ STIOCB

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

Definition at line 51 of file StoreIOState.h.

◆ STRCB

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

◆ CloseHow

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 ( StoreIOState::STFNCB cbFile,
StoreIOState::STIOCB cbIo,
void *  data 
)

Definition at line 30 of file StoreIOState.cc.

References flags, NULL, and read.

◆ ~StoreIOState()

StoreIOState::~StoreIOState ( )
virtual

Definition at line 45 of file StoreIOState.cc.

References callback_data, cbdataReferenceDone, debugs, and read.

Member Function Documentation

◆ close()

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

◆ offset()

off_t StoreIOState::offset ( ) const
inline

◆ operator delete()

void StoreIOState::operator delete ( void *  address)

Definition at line 25 of file StoreIOState.cc.

References assert.

◆ operator new()

void * StoreIOState::operator new ( size_t  amount)

Definition at line 18 of file StoreIOState.cc.

References assert.

◆ read_()

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 offset(), and storeRead().

◆ touchingStoreEntry()

bool StoreIOState::touchingStoreEntry ( ) const

◆ write()

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(), offset(), Rock::HeaderUpdater::startWriting(), and storeIOWrite().

Member Data Documentation

◆ callback [1/2]

◆ callback [2/2]

STRCB* StoreIOState::callback

Definition at line 93 of file StoreIOState.h.

◆ callback_data

◆ closing

bool StoreIOState::closing

Definition at line 98 of file StoreIOState.h.

Referenced by storeClose().

◆ e

◆ file_callback

STFNCB* StoreIOState::file_callback

Definition at line 88 of file StoreIOState.h.

◆ flags

struct { ... } StoreIOState::flags

Referenced by storeClose(), and StoreIOState().

◆ mode

◆ offset_

◆ read

◆ swap_dirn

◆ swap_filen


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors