#include "acl/ChecklistFiller.h"
#include "base/AsyncCall.h"
#include "base/forward.h"
#include "dlink.h"
#include "store/ParsingBuffer.h"
#include "StoreIOBuffer.h"
#include "StoreIOState.h"
#include "DelayId.h"
Go to the source code of this file.
Classes | |
class | StoreClient |
a storeGetPublic*() caller More... | |
class | store_client |
struct | store_client::Callback |
Typedefs | |
using | STCB = void(void *, StoreIOBuffer) |
Functions | |
void | storeClientCopy (store_client *, StoreEntry *, StoreIOBuffer, STCB *, void *) |
store_client * | storeClientListAdd (StoreEntry *e, void *data) |
int | storeUnregister (store_client *sc, StoreEntry *e, void *data) |
int | storePendingNClients (const StoreEntry *e) |
int | storeClientIsThisAClient (store_client *sc, void *someClient) |
Typedef Documentation
◆ STCB
using STCB = void (void *, StoreIOBuffer) |
A storeClientCopy() callback function.
Upon storeClientCopy() success, StoreIOBuffer::flags.error is zero, and
- HTTP response headers (if any) are available via MemObject::freshestReply();
- HTTP response body bytes (if any) are available via StoreIOBuffer.
STCB callbacks may use response semantics to detect certain EOF conditions. Callbacks that expect HTTP headers may call store_client::atEof(). Similar to clientStreamCallback() callbacks, callbacks dedicated to receiving HTTP bodies may use zero StoreIOBuffer::length as an EOF condition.
Errors are indicated by setting StoreIOBuffer flags.error.
Definition at line 32 of file StoreClient.h.
Function Documentation
◆ storeClientCopy()
void storeClientCopy | ( | store_client * | sc, |
StoreEntry * | e, | ||
StoreIOBuffer | copyInto, | ||
STCB * | callback, | ||
void * | data | ||
) |
Asynchronously read HTTP response headers and/or body bytes from Store.
The requested zero-based HTTP body offset is specified via the StoreIOBuffer::offset field. The first call (for a given store_client object) must specify zero offset.
The requested HTTP body portion size is specified via the StoreIOBuffer::length field. The function may return fewer body bytes.
See STCB for result delivery details.
Definition at line 213 of file store_client.cc.
Referenced by asHandleReply(), asnCacheStart(), netdbExchangeHandleReply(), netdbExchangeStart(), peerDigestHandleReply(), peerDigestRequest(), Mgr::StoreToCommWriter::scheduleStoreCopy(), UrnState::start(), and urnHandleReply().
◆ storeClientIsThisAClient()
int storeClientIsThisAClient | ( | store_client * | sc, |
void * | someClient | ||
) |
Referenced by clientReplyContext::processExpired().
◆ storeClientListAdd()
store_client * storeClientListAdd | ( | StoreEntry * | e, |
void * | data | ||
) |
Definition at line 123 of file store_client.cc.
References MemObject::addClient(), assert, StoreEntry::mem_obj, NULL, and sc.
Referenced by Ssl::ServerBump::ServerBump(), asnCacheStart(), clientReplyContext::createStoreEntry(), clientReplyContext::doGetMoreData(), netdbExchangeStart(), peerDigestRequest(), clientReplyContext::processExpired(), clientReplyContext::setReplyToStoreEntry(), Mgr::StoreToCommWriter::start(), and UrnState::start().
◆ storePendingNClients()
int storePendingNClients | ( | const StoreEntry * | e | ) |
Definition at line 874 of file store_client.cc.
References debugs, StoreEntry::mem_obj, and MemObject::nclients.
Referenced by CheckQuickAbortIsReasonable(), FwdState::completed(), StoreEntry::doAbandon(), and statStoreEntry().
◆ storeUnregister()
int storeUnregister | ( | store_client * | sc, |
StoreEntry * | e, | ||
void * | data | ||
) |
Definition at line 749 of file store_client.cc.
References StoreEntry::abort(), assert, cbdataReferenceDone, CheckQuickAbortIsReasonable(), MemObject::clientCount(), MemObject::clients, debugs, dlinkDelete(), StoreEntry::getMD5Text(), StatCounters::ins, StoreEntry::kickProducer(), MemObject::kickReads(), StoreEntry::lock(), StoreEntry::mem_obj, MemObject::nclients, StoreIOState::readerDone, sc, statCounter, STORE_OK, StoreEntry::store_status, storeClose(), StatCounters::swap, StoreEntry::swapOut(), StoreEntry::swapoutFailed(), StoreEntry::swappedOut(), and StoreEntry::unlock().
Referenced by ASState::~ASState(), DigestFetchState::~DigestFetchState(), netdbExchangeState::~netdbExchangeState(), Ssl::ServerBump::~ServerBump(), UrnState::~UrnState(), peerDigestFetchFinish(), peerDigestFetchReply(), clientReplyContext::removeStoreReference(), and Mgr::StoreToCommWriter::swanSong().