#include <helper.h>

Inheritance diagram for helper_server:
Collaboration diagram for helper_server:

Public Types

typedef std::map< uint64_t,
Requests::iterator > 
RequestIndex
 
typedef std::list
< Helper::Xaction * > 
Requests
 

Public Member Functions

void * operator new (size_t size)
 
void operator delete (void *address)
 
void * toCbdata () noexcept
 
Helper::XactionpopRequest (int requestId)
 
void checkForTimedOutRequests (bool const retry)
 
void closePipesSafely (const char *name)
 
void closeWritePipeSafely (const char *name)
 
void initStats ()
 

Static Public Member Functions

static void requestTimeout (const CommTimeoutCbParams &io)
 Read timeout handler. More...
 

Public Attributes

uint64_t nextRequestId
 
MemBufwqueue
 
MemBufwritebuf
 
helperparent
 
Helper::XactionreplyXaction
 
bool ignoreToEom
 Whether to ignore current message, because it is timed-out or other reason. More...
 
RequestIndex requestsIndex
 maps request IDs to requests More...
 
const InstanceId
< HelperServerBase
index
 
int pid
 
Ip::Address addr
 
Comm::ConnectionPointer readPipe
 
Comm::ConnectionPointer writePipe
 
void * hIpc
 
char * rbuf
 
size_t rbuf_sz
 
size_t roffset
 
struct timeval dispatch_time
 
struct timeval answer_time
 
dlink_node link
 
struct
HelperServerBase::_helper_flags 
flags
 
Requests requests
 requests in order of submission/expiration More...
 
struct {
   uint64_t   uses
 
   uint64_t   replies
 
   uint64_t   pending
 
   uint64_t   releases
 
   uint64_t   timedout
 
stats
 

Static Private Attributes

static cbdata_type CBDATA_helper_server = CBDATA_UNKNOWN
 

Detailed Description

Definition at line 209 of file helper.h.

Member Typedef Documentation

typedef std::map<uint64_t, Requests::iterator> helper_server::RequestIndex

Definition at line 231 of file helper.h.

typedef std::list<Helper::Xaction *> HelperServerBase::Requests
inherited

Definition at line 193 of file helper.h.

Member Function Documentation

void HelperServerBase::closePipesSafely ( const char *  name)
inherited

Closes pipes to the helper safely. Handles the case where the read and write pipes are the same FD.

Parameters
namedisplayed for the helper being shutdown if logging an error

Definition at line 75 of file helper.cc.

References Comm::Connection::close(), HelperServerBase::_helper_flags::closing, DBG_IMPORTANT, debugs, Comm::Connection::fd, HelperServerBase::flags, getCurrentTime(), HelperServerBase::hIpc, HelperServerBase::index, HelperServerBase::pid, HelperServerBase::readPipe, and HelperServerBase::writePipe.

Referenced by helperHandleRead(), helperReturnBuffer(), helperShutdown(), helperStatefulHandleRead(), and helperStatefulShutdown().

void HelperServerBase::closeWritePipeSafely ( const char *  name)
inherited

Closes the reading pipe. If the read and write sockets are the same the write pipe will also be closed. Otherwise its left open for later handling.

Parameters
namedisplayed for the helper being shutdown if logging an error

Definition at line 101 of file helper.cc.

References Comm::Connection::close(), HelperServerBase::_helper_flags::closing, DBG_IMPORTANT, debugs, Comm::Connection::fd, HelperServerBase::flags, getCurrentTime(), HelperServerBase::hIpc, HelperServerBase::index, HelperServerBase::pid, HelperServerBase::readPipe, and HelperServerBase::writePipe.

Referenced by helperServerFree(), helperStatefulServerDone(), and helperStatefulServerFree().

void HelperServerBase::initStats ( )
inherited

Definition at line 65 of file helper.cc.

References HelperServerBase::stats.

Referenced by helperOpenServers(), and helperStatefulOpenServers().

void helper_server::operator delete ( void *  address)
inline

Definition at line 211 of file helper.h.

void* helper_server::operator new ( size_t  size)
inline

Definition at line 211 of file helper.h.

Helper::Xaction * helper_server::popRequest ( int  requestId)

Search in queue for the request with requestId, return the related Xaction object and remove it from queue. If concurrency is disabled then the requestId is ignored and the Xaction of the next request in queue is retrieved.

Definition at line 848 of file helper.cc.

References helper::childs, Helper::ChildConfig::concurrency, parent, HelperServerBase::requests, and requestsIndex.

Referenced by helperHandleRead().

void* helper_server::toCbdata ( )
inlinenoexcept

Definition at line 211 of file helper.h.

Member Data Documentation

Ip::Address HelperServerBase::addr
inherited

Definition at line 172 of file helper.h.

Referenced by helperOpenServers(), and helperStatefulOpenServers().

struct timeval HelperServerBase::answer_time
inherited

Definition at line 182 of file helper.h.

Referenced by helperReturnBuffer(), helperStatefulHandleRead(), and helper::packStatsInto().

cbdata_type helper_server::CBDATA_helper_server = CBDATA_UNKNOWN
staticprivate

Definition at line 211 of file helper.h.

struct timeval HelperServerBase::dispatch_time
inherited
void* HelperServerBase::hIpc
inherited
bool helper_server::ignoreToEom

Definition at line 228 of file helper.h.

Referenced by helperHandleRead(), and helperOpenServers().

dlink_node HelperServerBase::link
inherited
uint64_t helper_server::nextRequestId

Definition at line 211 of file helper.h.

Referenced by helperDispatch(), and helperOpenServers().

char* HelperServerBase::rbuf
inherited
uint64_t HelperServerBase::releases
inherited

Definition at line 200 of file helper.h.

Referenced by helperStatefulReleaseServer().

uint64_t HelperServerBase::replies
inherited
Helper::Xaction* helper_server::replyXaction

The helper request Xaction object for the current reply . A helper reply may be distributed to more than one of the retrieved packets from helper. This member stores the Xaction object as long as the end-of-message for current reply is not retrieved.

Definition at line 225 of file helper.h.

Referenced by helperHandleRead(), helperOpenServers(), and helperReturnBuffer().

RequestIndex helper_server::requestsIndex

Definition at line 232 of file helper.h.

Referenced by checkForTimedOutRequests(), helperDispatch(), helperServerFree(), and popRequest().

size_t HelperServerBase::roffset
inherited
uint64_t HelperServerBase::timedout
inherited

Definition at line 201 of file helper.h.

Referenced by helperHandleRead(), and helper::packStatsInto().

uint64_t HelperServerBase::uses
inherited

Definition at line 197 of file helper.h.

Referenced by helperDispatch(), helperStatefulDispatch(), and helper::packStatsInto().

MemBuf* helper_server::wqueue
MemBuf* helper_server::writebuf

Definition at line 217 of file helper.h.

Referenced by helperDispatch(), helperDispatchWriteDone(), and helperServerFree().


The documentation for this class was generated from the following files:

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors