#include <ICP.h>
Inherits Continuation.
Data Structures | |
struct | ICPRequestEventArgs |
Public Types | |
enum | { RETRY_INTERVAL = 10 } |
enum | { ICP_REQUEST_HASH_SIZE = 1024 } |
typedef struct ICPRequestCont::ICPRequestEventArgs | ICPRequestEventArgs_t |
Public Member Functions | |
ICPRequestCont (ICPProcessor *i=0, Continuation *c=0, URL *u=0) | |
~ICPRequestCont () | |
void * | operator new (size_t size, void *mem) |
void | operator delete (void *mem) |
void | SetRequestStartTime () |
ink_hrtime | GetRequestStartTime () |
class Action * | GetActionPtr () |
int | ICPRequestEvent (int, Event *) |
int | NopICPRequestEvent (int, Event *) |
Static Public Member Functions | |
static void | NetToHostICPMsg (ICPMsg_t *, ICPMsg_t *) |
static int | BuildICPMsg (ICPopcode_t op, unsigned int sequence_number, int optflags, int optdata, int shostid, void *data, int datalen, struct msghdr *mhdr, struct iovec *iov, ICPMsg_t *icpmsg) |
static unsigned int | ICPReqSeqNumber () |
static int | ICPRequestHash (unsigned int) |
static int | AddICPRequest (unsigned int, ICPRequestCont *) |
static ICPRequestCont * | FindICPRequest (unsigned int) |
static int | RemoveICPRequest (unsigned int) |
Friends | |
class | ICPProcessor |
Definition at line 1121 of file ICP.h.
ICPRequestCont::ICPRequestCont | ( | ICPProcessor * | i = 0 , |
|
Continuation * | c = 0 , |
|||
URL * | u = 0 | |||
) |
Definition at line 1011 of file ICP.cc.
References Action::cancelled, MSG_IOVECS, and Continuation::mutex.
ICPRequestCont::~ICPRequestCont | ( | ) |
Definition at line 1030 of file ICP.cc.
References ats_free(), Action::cancel(), ICPMsg::h, ICP_OP_QUERY, Continuation::mutex, ICPMsgHeader::opcode, ICPMsg::query, RemoveICPRequest(), ICPMsg::un, and ICPQuery::URL.
int ICPRequestCont::AddICPRequest | ( | unsigned int | seqno, | |
ICPRequestCont * | r | |||
) | [static] |
Definition at line 1712 of file ICP.cc.
References Queue< C, L >::enqueue(), and ICPRequestHash().
int ICPRequestCont::BuildICPMsg | ( | ICPopcode_t | op, | |
unsigned int | sequence_number, | |||
int | optflags, | |||
int | optdata, | |||
int | shostid, | |||
void * | data, | |||
int | datalen, | |||
struct msghdr * | mhdr, | |||
struct iovec * | iov, | |||
ICPMsg_t * | icpmsg | |||
) | [static] |
Definition at line 1608 of file ICP.cc.
References ICPMsg::h, ICPMsg::hit, ICP_OP_HIT, ICP_OP_MISS, ICP_OP_QUERY, ink_release_assert, ICPMsg::miss, ICPMsgHeader::msglen, ICPMsgHeader::opcode, ICPMsgHeader::optiondata, ICPMsgHeader::optionflags, ICPMsg::query, ICPMsgHeader::requestno, ICPQuery::rhostid, ICPMsgHeader::shostid, ICPMsg::un, ICPMiss::URL, ICPHit::URL, ICPQuery::URL, and ICPMsgHeader::version.
Referenced by ICPPeerReadCont::PeerReadStateMachine().
ICPRequestCont * ICPRequestCont::FindICPRequest | ( | unsigned int | seqno | ) | [static] |
Definition at line 1723 of file ICP.cc.
References ICPRequestHash().
Referenced by ICPPeerReadCont::PeerReadStateMachine().
class Action* ICPRequestCont::GetActionPtr | ( | ) | [inline] |
Definition at line 1138 of file ICP.h.
Referenced by ICPProcessor::ICPQuery(), and ICPPeerReadCont::PeerReadStateMachine().
ink_hrtime ICPRequestCont::GetRequestStartTime | ( | ) | [inline] |
Definition at line 1134 of file ICP.h.
Referenced by ICPPeerReadCont::PeerReadStateMachine().
int ICPRequestCont::ICPRequestEvent | ( | int | event, | |
Event * | e | |||
) |
Definition at line 1094 of file ICP.cc.
References ET_ICP, EVENT_CONT, EVENT_IMMEDIATE, EVENT_INTERVAL, eventProcessor, HRTIME_MSECONDS, ICP_RESPONSE_MESSAGE, ink_assert, ink_release_assert, NET_EVENT_DATAGRAM_WRITE_COMPLETE, NET_EVENT_DATAGRAM_WRITE_ERROR, RETRY_INTERVAL, and EventProcessor::schedule_in().
Referenced by ICPProcessor::ICPQuery().
int ICPRequestCont::ICPRequestHash | ( | unsigned int | seqno | ) | [inline, static] |
Definition at line 1704 of file ICP.cc.
Referenced by AddICPRequest(), FindICPRequest(), and RemoveICPRequest().
Definition at line 1562 of file ICP.cc.
References ICPHitObj::data, ICPMsg::h, ICPMsg::hit, ICPMsg::hitobj, ICP_OP_HIT, ICP_OP_HIT_OBJ, ICP_OP_MISS, ICP_OP_QUERY, memcpy, ICPMsg::miss, ICPMsgHeader::msglen, ICPHitObj::objsize, ICPMsgHeader::opcode, ICPMsgHeader::optiondata, ICPMsgHeader::optionflags, ICPHitObj::p_objsize, ICPMsg::query, ICPMsgHeader::requestno, ICPQuery::rhostid, ICPMsgHeader::shostid, ICPMsg::un, ICPHitObj::URL, ICPMiss::URL, ICPHit::URL, ICPQuery::URL, and ICPMsgHeader::version.
Referenced by ICPPeerReadCont::PeerReadStateMachine().
void ICPRequestCont::operator delete | ( | void * | mem | ) | [inline] |
Definition at line 1240 of file ICP.h.
References ClassAllocator< C >::free().
void * ICPRequestCont::operator new | ( | size_t | size, | |
void * | mem | |||
) | [inline] |
int ICPRequestCont::RemoveICPRequest | ( | unsigned int | seqno | ) | [static] |
Definition at line 1738 of file ICP.cc.
References ICPRequestHash(), and Queue< C, L >::remove().
Referenced by ~ICPRequestCont().
void ICPRequestCont::SetRequestStartTime | ( | ) | [inline] |
Definition at line 1130 of file ICP.h.
References ink_get_hrtime().
Referenced by ICPProcessor::ICPQuery().
friend class ICPProcessor [friend] |