#include <RequestId.h>

Collaboration diagram for Ipc::RequestId:

Public Types

typedef unsigned int Index

Public Member Functions

 RequestId (Index)
 RequestId ()=default
 request recipient's constructor More...
void reset ()
void reset (const Index anIndex)
QuestionerId questioner () const
Index index () const
 operator Index () const
RequestIdoperator= (const Index anIndex)

Private Attributes

QuestionerId qid_
 the sender of the request More...
Index index_ = 0
 request ID; unique within pending same-qid_ questions of the same kind More...

Detailed Description

uniquely identifies an IPC request among same-type concurrent IPC requests submitted by a single Squid instance

Definition at line 22 of file RequestId.h.

Member Typedef Documentation

◆ Index

typedef unsigned int Ipc::RequestId::Index

A simple ID for correlating IPC responses with pending requests. Value 0 has a special meaning of "unset/unknown", but otherwise opaque.

Definition at line 27 of file RequestId.h.

Constructor & Destructor Documentation

◆ RequestId() [1/2]

Ipc::RequestId::RequestId ( Index  anIndex)

Request sender's constructor. For performance and clarity sake, default constructor is preferred to 0 index.

Definition at line 16 of file RequestId.cc.

◆ RequestId() [2/2]

Ipc::RequestId::RequestId ( )

Referenced by reset().

Member Function Documentation

◆ index()

Index Ipc::RequestId::index ( ) const

Definition at line 45 of file RequestId.h.

References index_.

Referenced by Ipc::operator<<(), and Ipc::SharedListenJoined().

◆ operator Index()

Ipc::RequestId::operator Index ( ) const

Definition at line 48 of file RequestId.h.

References index_.

◆ operator=()

RequestId & Ipc::RequestId::operator= ( const Index  anIndex)

Definition at line 49 of file RequestId.h.

References reset().

◆ questioner()

QuestionerId Ipc::RequestId::questioner ( ) const

◆ reset() [1/2]

void Ipc::RequestId::reset ( )

Make the ID unset/unknown. Optimization: leaves the questioner field alone.

Definition at line 38 of file RequestId.h.

References index_.

Referenced by operator=().

◆ reset() [2/2]

void Ipc::RequestId::reset ( const Index  anIndex)

Make the ID set/known with the given (by the questioner) index. For performance and clarity sake, reset(void) is preferred to reset(0).

Definition at line 42 of file RequestId.h.

References RequestId().

Member Data Documentation

◆ index_

Index Ipc::RequestId::index_ = 0

Definition at line 56 of file RequestId.h.

Referenced by index(), operator Index(), and reset().

◆ qid_

QuestionerId Ipc::RequestId::qid_

Definition at line 53 of file RequestId.h.

Referenced by questioner().

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






Web Site Translations