#include <RequestId.h>
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 | |
RequestId & | operator= (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]
|
explicit |
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]
|
default |
Referenced by reset().
Member Function Documentation
◆ index()
|
inline |
Definition at line 45 of file RequestId.h.
References index_.
Referenced by Ipc::operator<<(), and Ipc::SharedListenJoined().
◆ operator Index()
|
inline |
Definition at line 48 of file RequestId.h.
References index_.
◆ operator=()
Definition at line 49 of file RequestId.h.
References reset().
◆ questioner()
|
inline |
Definition at line 44 of file RequestId.h.
References qid_.
Referenced by Ipc::Response::intendedRecepient(), Ipc::SharedListenResponse::intendedRecepient(), and Ipc::operator<<().
◆ reset() [1/2]
|
inline |
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]
|
inline |
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_
|
private |
Definition at line 56 of file RequestId.h.
Referenced by index(), operator Index(), and reset().
◆ qid_
|
private |
Definition at line 53 of file RequestId.h.
Referenced by questioner().
The documentation for this class was generated from the following files:
- src/ipc/RequestId.h
- src/ipc/RequestId.cc