|
Squid Web Cache master
|
#include <StoreIOState.h>
Public Types | |
| enum | CloseHow { wroteAll , writerGone , readerDone } |
| typedef RefCount< StoreIOState > | Pointer |
| typedef void | STRCB(void *their_data, const char *buf, ssize_t len, 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::STIOCB *, void *cbData) | |
| ~StoreIOState () override | |
| 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 | |
| bool | touchingStoreEntry () const |
Public Attributes | ||
| sdirno | swap_dirn | |
| sfileno | swap_filen | |
| StoreEntry * | e | |
| mode_t | mode | |
| off_t | offset_ | |
| number of bytes written or read for this entry so far | ||
| STIOCB * | callback | |
| void * | callback_data | |
| struct { | ||
| STRCB * callback | ||
| void * callback_data | ||
| } | read | |
| struct { | ||
| bool closing | ||
| } | flags | |
Definition at line 17 of file StoreIOState.h.
| typedef RefCount<StoreIOState> StoreIOState::Pointer |
Definition at line 21 of file StoreIOState.h.
| typedef void StoreIOState::STIOCB(void *their_data, int errflag, StoreIOState::Pointer self) |
Definition at line 39 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.
| 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 57 of file StoreIOState.h.
| StoreIOState::StoreIOState | ( | StoreIOState::STIOCB * | cbIo, |
| void * | cbData | ||
| ) |
Definition at line 30 of file StoreIOState.cc.
|
override |
Definition at line 44 of file StoreIOState.cc.
References callback_data, cbdataReferenceDone, debugs, and read.
|
pure virtual |
Implemented in Rock::IoState, and Fs::Ufs::UFSStoreState.
Referenced by storeClose().
|
inline |
Definition at line 48 of file StoreIOState.h.
References offset_.
Referenced by store_client::fileRead(), MemObject::objectBytesOnDisk(), MemObject::stat(), and StoreEntry::swapOut().
| 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.
|
pure virtual |
Implemented in Rock::IoState, and Fs::Ufs::UFSStoreState.
Referenced by storeRead().
| bool StoreIOState::touchingStoreEntry | ( | ) | const |
Definition at line 52 of file StoreIOState.cc.
References e, StoreEntry::swap_filen, and swap_filen.
Referenced by Rock::SwapDir::writeCompleted(), and Rock::SwapDir::writeError().
|
pure virtual |
write the given buffer and free it when it is no longer needed
| offset | zero for the very first write and -1 for all other writes |
| false | if write failed (callback has been or will be called) |
Implemented in Rock::IoState, and Fs::Ufs::UFSStoreState.
Referenced by doPages(), and storeIOWrite().
| STIOCB* StoreIOState::callback |
Definition at line 76 of file StoreIOState.h.
Referenced by Fs::Ufs::UFSStrategy::callback().
| STRCB* StoreIOState::callback |
Definition at line 80 of file StoreIOState.h.
| void* StoreIOState::callback_data |
Definition at line 77 of file StoreIOState.h.
Referenced by ~StoreIOState().
| bool StoreIOState::closing |
Definition at line 85 of file StoreIOState.h.
Referenced by storeClose().
| StoreEntry* StoreIOState::e |
Definition at line 73 of file StoreIOState.h.
Referenced by Rock::IoState::IoState(), Fs::Ufs::UFSStoreState::UFSStoreState(), touchingStoreEntry(), Rock::SwapDir::writeCompleted(), and Rock::SwapDir::writeError().
| struct { ... } StoreIOState::flags |
Referenced by StoreIOState(), and storeClose().
| mode_t StoreIOState::mode |
Definition at line 74 of file StoreIOState.h.
Referenced by Fs::Ufs::UFSStrategy::create(), Fs::Ufs::UFSStoreState::ioCompletedNotification(), and Fs::Ufs::UFSStrategy::open().
| off_t StoreIOState::offset_ |
Definition at line 75 of file StoreIOState.h.
Referenced by offset().
| struct { ... } StoreIOState::read |
Referenced by StoreIOState(), and ~StoreIOState().
| sdirno StoreIOState::swap_dirn |
Definition at line 71 of file StoreIOState.h.
Referenced by Fs::Ufs::UFSStoreState::UFSStoreState(), Rock::SwapDir::createStoreIO(), Rock::SwapDir::createUpdateIO(), Fs::Ufs::UFSStoreState::ioCompletedNotification(), Rock::SwapDir::openStoreIO(), and storeSwapOutStart().
| sfileno StoreIOState::swap_filen |
Definition at line 72 of file StoreIOState.h.
Referenced by Fs::Ufs::UFSStoreState::UFSStoreState(), Fs::Ufs::UFSStrategy::create(), Rock::SwapDir::createStoreIO(), Rock::SwapDir::createUpdateIO(), Fs::Ufs::UFSStoreState::ioCompletedNotification(), Rock::SwapDir::openStoreIO(), storeSwapOutStart(), touchingStoreEntry(), Rock::SwapDir::writeCompleted(), and Rock::SwapDir::writeError().