#include <Queue.h>

Inheritance diagram for Ipc::BaseMultiQueue:
Collaboration diagram for Ipc::BaseMultiQueue:

Public Member Functions

 BaseMultiQueue (const int aLocalProcessId)
 
virtual ~BaseMultiQueue ()
 
void clearReaderSignal (const int remoteProcessId)
 clears the reader notification received by the local process from the remote process More...
 
template<class Value >
bool pop (int &remoteProcessId, Value &value)
 picks a process and calls OneToOneUniQueue::pop() using its queue More...
 
template<class Value >
bool push (const int remoteProcessId, const Value &value)
 calls OneToOneUniQueue::push() using the given process queue More...
 
template<class Value >
bool peek (int &remoteProcessId, Value &value) const
 peeks at the item likely to be pop()ed next More...
 
QueueReader::BalancelocalBalance ()
 returns local reader's balance More...
 
const QueueReader::Balancebalance (const int remoteProcessId) const
 returns reader's balance for a given remote process More...
 
QueueReader::RatelocalRateLimit ()
 returns local reader's rate limit More...
 
const QueueReader::RaterateLimit (const int remoteProcessId) const
 returns reader's rate limit for a given remote process More...
 
int inSize (const int remoteProcessId) const
 number of items in incoming queue from a given remote process More...
 
int outSize (const int remoteProcessId) const
 number of items in outgoing queue to a given remote process More...
 

Protected Member Functions

virtual const OneToOneUniQueueinQueue (const int remoteProcessId) const =0
 incoming queue from a given remote process More...
 
OneToOneUniQueueinQueue (const int remoteProcessId)
 
virtual const OneToOneUniQueueoutQueue (const int remoteProcessId) const =0
 outgoing queue to a given remote process More...
 
OneToOneUniQueueoutQueue (const int remoteProcessId)
 
virtual const QueueReaderlocalReader () const =0
 
QueueReaderlocalReader ()
 
virtual const QueueReaderremoteReader (const int remoteProcessId) const =0
 
QueueReaderremoteReader (const int remoteProcessId)
 
virtual int remotesCount () const =0
 
virtual int remotesIdOffset () const =0
 

Protected Attributes

const int theLocalProcessId
 process ID of this queue More...
 

Private Attributes

int theLastPopProcessId
 the ID of the last process we tried to pop() from More...
 

Detailed Description

Base class for lockless fixed-capacity bidirectional queues for a limited number processes.

Definition at line 152 of file Queue.h.

Constructor & Destructor Documentation

◆ BaseMultiQueue()

Ipc::BaseMultiQueue::BaseMultiQueue ( const int  aLocalProcessId)

Definition at line 133 of file Queue.cc.

◆ ~BaseMultiQueue()

virtual Ipc::BaseMultiQueue::~BaseMultiQueue ( )
inlinevirtual

Definition at line 156 of file Queue.h.

Member Function Documentation

◆ balance()

const Ipc::QueueReader::Balance & Ipc::BaseMultiQueue::balance ( const int  remoteProcessId) const

Definition at line 154 of file Queue.cc.

References Ipc::QueueReader::balance, and remoteReader().

◆ clearReaderSignal()

void Ipc::BaseMultiQueue::clearReaderSignal ( const int  remoteProcessId)

Definition at line 140 of file Queue.cc.

References Ipc::QueueReader::clearSignal(), debugs, Ipc::QueueReader::id, and localReader().

◆ inQueue() [1/2]

virtual const OneToOneUniQueue& Ipc::BaseMultiQueue::inQueue ( const int  remoteProcessId) const
protectedpure virtual

Implemented in Ipc::MultiQueue, and Ipc::FewToFewBiQueue.

Referenced by inQueue().

◆ inQueue() [2/2]

Ipc::OneToOneUniQueue & Ipc::BaseMultiQueue::inQueue ( const int  remoteProcessId)
protected

Definition at line 168 of file Queue.cc.

References inQueue().

◆ inSize()

int Ipc::BaseMultiQueue::inSize ( const int  remoteProcessId) const
inline

Definition at line 183 of file Queue.h.

◆ localBalance()

QueueReader::Balance& Ipc::BaseMultiQueue::localBalance ( )
inline

Definition at line 171 of file Queue.h.

References Ipc::QueueReader::balance.

◆ localRateLimit()

QueueReader::Rate& Ipc::BaseMultiQueue::localRateLimit ( )
inline

Definition at line 177 of file Queue.h.

References Ipc::QueueReader::rateLimit.

◆ localReader() [1/2]

virtual const QueueReader& Ipc::BaseMultiQueue::localReader ( ) const
protectedpure virtual

Implemented in Ipc::MultiQueue, and Ipc::FewToFewBiQueue.

Referenced by clearReaderSignal(), and localReader().

◆ localReader() [2/2]

Ipc::QueueReader & Ipc::BaseMultiQueue::localReader ( )
protected

Definition at line 184 of file Queue.cc.

References localReader().

◆ outQueue() [1/2]

virtual const OneToOneUniQueue& Ipc::BaseMultiQueue::outQueue ( const int  remoteProcessId) const
protectedpure virtual

Implemented in Ipc::MultiQueue, and Ipc::FewToFewBiQueue.

Referenced by outQueue().

◆ outQueue() [2/2]

Ipc::OneToOneUniQueue & Ipc::BaseMultiQueue::outQueue ( const int  remoteProcessId)
protected

Definition at line 176 of file Queue.cc.

References outQueue().

◆ outSize()

int Ipc::BaseMultiQueue::outSize ( const int  remoteProcessId) const
inline

Definition at line 186 of file Queue.h.

◆ peek()

template<class Value >
bool Ipc::BaseMultiQueue::peek ( int remoteProcessId,
Value &  value 
) const

Definition at line 461 of file Queue.h.

References i, and Ipc::OneToOneUniQueue::peek().

◆ pop()

template<class Value >
bool Ipc::BaseMultiQueue::pop ( int remoteProcessId,
Value &  value 
)

Definition at line 433 of file Queue.h.

References debugs, HERE(), i, Ipc::OneToOneUniQueue::pop(), and Ipc::OneToOneUniQueue::size().

◆ push()

template<class Value >
bool Ipc::BaseMultiQueue::push ( const int  remoteProcessId,
const Value &  value 
)

Definition at line 451 of file Queue.h.

References debugs, HERE(), Ipc::OneToOneUniQueue::push(), and Ipc::OneToOneUniQueue::size().

◆ rateLimit()

const Ipc::QueueReader::Rate & Ipc::BaseMultiQueue::rateLimit ( const int  remoteProcessId) const

Definition at line 161 of file Queue.cc.

References Ipc::QueueReader::rateLimit, and remoteReader().

◆ remoteReader() [1/2]

virtual const QueueReader& Ipc::BaseMultiQueue::remoteReader ( const int  remoteProcessId) const
protectedpure virtual

Implemented in Ipc::MultiQueue, and Ipc::FewToFewBiQueue.

Referenced by balance(), rateLimit(), and remoteReader().

◆ remoteReader() [2/2]

Ipc::QueueReader & Ipc::BaseMultiQueue::remoteReader ( const int  remoteProcessId)
protected

Definition at line 192 of file Queue.cc.

References remoteReader().

◆ remotesCount()

virtual int Ipc::BaseMultiQueue::remotesCount ( ) const
protectedpure virtual

Implemented in Ipc::MultiQueue, and Ipc::FewToFewBiQueue.

◆ remotesIdOffset()

virtual int Ipc::BaseMultiQueue::remotesIdOffset ( ) const
protectedpure virtual

Implemented in Ipc::MultiQueue, and Ipc::FewToFewBiQueue.

Member Data Documentation

◆ theLastPopProcessId

int Ipc::BaseMultiQueue::theLastPopProcessId
private

Definition at line 210 of file Queue.h.

◆ theLocalProcessId


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors