#include <ICP.h>
Public Types | |
enum | ReconfigState_t { RC_RECONFIG, RC_ENABLE_ICP, RC_DONE } |
Public Member Functions | |
ICPProcessor () | |
~ICPProcessor () | |
void | start () |
Action * | ICPQuery (Continuation *, URL *) |
ReconfigState_t | ReconfigureStateMachine (ReconfigState_t, int, int) |
Peer * | FindPeer (IpAddr const &ip, uint16_t port=0) |
Peer * | FindPeer (IpEndpoint const &ip) |
Peer * | FindPeer (sockaddr const *ip) |
Peer * | GetLocalPeer () |
Peer * | IdToPeer (int id) |
ICPConfiguration * | GetConfig () |
int | GetFreePeers () |
int | GetFreeSendPeers () |
int | GetFreeRecvPeers () |
Friends | |
class | ICPHandlerCont |
class | ICPPeerReadCont |
class | ICPRequestCont |
Definition at line 748 of file ICP.h.
ICPProcessor::~ICPProcessor | ( | ) |
Definition at line 1793 of file ICP.cc.
References Action::cancel(), Continuation::mutex, MUTEX_TAKE_LOCK, Mutex_unlock(), and this_ethread().
Definition at line 2344 of file ICP.cc.
Referenced by ParentSiblingPeer::ExtToIntRecvSockAddr(), FindPeer(), ICPPeerReadCont::PeerReadStateMachine(), and ParentSiblingPeer::ValidSender().
Peer* ICPProcessor::FindPeer | ( | IpEndpoint const & | ip | ) | [inline] |
Definition at line 772 of file ICP.h.
References ats_ip_port_host_order(), and FindPeer().
Peer* ICPProcessor::FindPeer | ( | sockaddr const * | ip | ) | [inline] |
Definition at line 775 of file ICP.h.
References ats_ip_port_host_order(), and FindPeer().
ICPConfiguration* ICPProcessor::GetConfig | ( | ) | [inline] |
Definition at line 787 of file ICP.h.
Referenced by ICPPeriodicCont::DoReconfigAction(), ICPPeerReadCont::ICPPeerQueryCont(), MultiCastPeer::IsOnline(), ICPPeerReadCont::PeerReadStateMachine(), ICPPeriodicCont::PeriodicEvent(), and ICPHandlerCont::PeriodicEvent().
int ICPProcessor::GetFreePeers | ( | ) | [inline] |
Definition at line 792 of file ICP.h.
Referenced by ICPPeerReadCont::PeerReadStateMachine().
int ICPProcessor::GetFreeSendPeers | ( | ) | [inline] |
Definition at line 796 of file ICP.h.
Referenced by ICPPeerReadCont::PeerReadStateMachine().
Peer* ICPProcessor::GetLocalPeer | ( | ) | [inline] |
Definition at line 779 of file ICP.h.
Referenced by ParentSiblingPeer::RecvFrom_re().
Action * ICPProcessor::ICPQuery | ( | Continuation * | c, | |
URL * | url | |||
) |
Definition at line 1880 of file ICP.cc.
References ET_ICP, eventProcessor, ICPRequestCont::GetActionPtr(), ICP_INCREMENT_DYN_STAT, icp_query_requests_stat, ICPRequestCont, ICPRequestCont_allocator, ICPRequestCont::ICPRequestEvent(), Thread::mutex, EventProcessor::schedule_imm(), SET_CONTINUATION_HANDLER, ICPRequestCont::SetRequestStartTime(), and this_ethread().
Referenced by ICPProcessorExt::ICPQuery().
Peer* ICPProcessor::IdToPeer | ( | int | id | ) | [inline] |
Definition at line 783 of file ICP.h.
Referenced by ICPPeerReadCont::PeerReadStateMachine().
ICPProcessor::ReconfigState_t ICPProcessor::ReconfigureStateMachine | ( | ReconfigState_t | s, | |
int | gconfig_changed, | |||
int | pconfig_changed | |||
) |
Definition at line 2233 of file ICP.cc.
References ICPConfiguration::HaveLock(), ink_assert, ink_release_assert, RC_DONE, RC_ENABLE_ICP, RC_RECONFIG, and ICPConfiguration::Unlock().
Referenced by ICPPeriodicCont::DoReconfigAction().
void ICPProcessor::start | ( | ) |
Definition at line 1809 of file ICP.cc.
References HTTPHdr::create(), ET_ICP, eventProcessor, ICPConfiguration::globalConfig(), HRTIME_MSECONDS, HTTP_TYPE_REQUEST, ICPHandlerCont::ICP_HANDLER_INTERVAL, ICPConfigData::ICPconfigured(), ICPHandlerCont::ICPDataBuf_IOBuffer_sizeindex, ICPHandlerCont, iobuffer_size_to_index(), MAX_BUFFER_SIZE_INDEX, MAX_ICP_MSGSIZE, ICPPeriodicCont::PERIODIC_INTERVAL, ICPHandlerCont::PeriodicEvent(), ICPPeriodicCont::PeriodicEvent(), EventProcessor::schedule_every(), SET_CONTINUATION_HANDLER, ICPHandlerCont::TossEvent(), and HTTPHdr::valid().
Referenced by ICPProcessorExt::start().
friend class ICPHandlerCont [friend] |
friend class ICPPeerReadCont [friend] |
friend class ICPRequestCont [friend] |
Definition at line 752 of file ICP.h.
Referenced by ICPQuery().