#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 More... | |
| 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 More... | |
| STIOCB * | callback |
| 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
| typedef RefCount<StoreIOState> StoreIOState::Pointer |
Definition at line 21 of file StoreIOState.h.
◆ STIOCB
| typedef void StoreIOState::STIOCB(void *their_data, int errflag, StoreIOState::Pointer self) |
Definition at line 39 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 57 of file StoreIOState.h.
Constructor & Destructor Documentation
◆ StoreIOState()
| StoreIOState::StoreIOState | ( | StoreIOState::STIOCB * | cbIo, |
| void * | cbData | ||
| ) |
Definition at line 30 of file StoreIOState.cc.
◆ ~StoreIOState()
|
override |
Definition at line 44 of file StoreIOState.cc.
References callback_data, cbdataReferenceDone, debugs, and read.
Member Function Documentation
◆ close()
|
pure virtual |
Implemented in Rock::IoState, and Fs::Ufs::UFSStoreState.
Referenced by storeClose().
◆ offset()
|
inline |
Definition at line 48 of file StoreIOState.h.
References offset_.
Referenced by store_client::fileRead(), MemObject::objectBytesOnDisk(), MemObject::stat(), and StoreEntry::swapOut().
◆ 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_()
|
pure virtual |
Implemented in Fs::Ufs::UFSStoreState, and Rock::IoState.
Referenced by storeRead().
◆ touchingStoreEntry()
| bool StoreIOState::touchingStoreEntry | ( | ) | const |
Definition at line 52 of file StoreIOState.cc.
References e, swap_filen, and StoreEntry::swap_filen.
Referenced by Rock::SwapDir::writeCompleted(), and Rock::SwapDir::writeError().
◆ write()
|
pure virtual |
write the given buffer and free it when it is no longer needed
- Parameters
-
offset zero for the very first write and -1 for all other writes
- Return values
-
false if 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
◆ callback [1/2]
| STIOCB* StoreIOState::callback |
Definition at line 76 of file StoreIOState.h.
◆ callback [2/2]
| STRCB* StoreIOState::callback |
Definition at line 80 of file StoreIOState.h.
◆ callback_data
| void* StoreIOState::callback_data |
Definition at line 77 of file StoreIOState.h.
Referenced by ~StoreIOState().
◆ closing
| bool StoreIOState::closing |
Definition at line 85 of file StoreIOState.h.
Referenced by storeClose().
◆ e
| StoreEntry* StoreIOState::e |
Definition at line 73 of file StoreIOState.h.
Referenced by Rock::IoState::IoState(), touchingStoreEntry(), Fs::Ufs::UFSStoreState::UFSStoreState(), Rock::SwapDir::writeCompleted(), and Rock::SwapDir::writeError().
◆ flags
| struct { ... } StoreIOState::flags |
Referenced by storeClose(), and StoreIOState().
◆ mode
| 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().
◆ offset_
| off_t StoreIOState::offset_ |
Definition at line 75 of file StoreIOState.h.
Referenced by offset().
◆ read
| struct { ... } StoreIOState::read |
Referenced by StoreIOState(), and ~StoreIOState().
◆ swap_dirn
| sdirno StoreIOState::swap_dirn |
Definition at line 71 of file StoreIOState.h.
Referenced by Fs::Ufs::UFSStoreState::ioCompletedNotification(), storeSwapOutStart(), and Fs::Ufs::UFSStoreState::UFSStoreState().
◆ swap_filen
| sfileno StoreIOState::swap_filen |
Definition at line 72 of file StoreIOState.h.
Referenced by Fs::Ufs::UFSStrategy::create(), Fs::Ufs::UFSStoreState::ioCompletedNotification(), storeSwapOutStart(), touchingStoreEntry(), Fs::Ufs::UFSStoreState::UFSStoreState(), Rock::SwapDir::writeCompleted(), and Rock::SwapDir::writeError().
The documentation for this class was generated from the following files:
- src/StoreIOState.h
- src/StoreIOState.cc
Introduction
- About Squid
- Why Squid?
- Squid Developers
- How to Donate
- How to Help Out
- Getting Squid
- Squid Source Packages
- Squid Deployment Case-Studies
- Squid Software Foundation
Documentation
- Quick Setup
- Configuration:
- FAQ and Wiki
- Guide Books:
- Non-English
- More...
Support
- Security Advisories
- Bugzilla Database
- Mailing lists
- Contacting us
- Commercial services
- Project Sponsors
- Squid-based products
