#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

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

Definition at line 133 of file Queue.cc.

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

Definition at line 156 of file Queue.h.

Member Function Documentation

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

Definition at line 154 of file Queue.cc.

References Ipc::QueueReader::balance.

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

Definition at line 140 of file Queue.cc.

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

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

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

Referenced by inSize(), peek(), and pop().

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

Definition at line 168 of file Queue.cc.

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

Definition at line 183 of file Queue.h.

References inQueue(), and Ipc::OneToOneUniQueue::size().

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

Definition at line 171 of file Queue.h.

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

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

Definition at line 177 of file Queue.h.

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

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

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

Referenced by localBalance(), localRateLimit(), and pop().

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

Definition at line 184 of file Queue.cc.

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

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

Referenced by outSize(), and push().

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

Definition at line 176 of file Queue.cc.

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

Definition at line 186 of file Queue.h.

References outQueue(), and Ipc::OneToOneUniQueue::size().

template<class Value >
bool Ipc::BaseMultiQueue::peek ( int remoteProcessId,
Value &  value 
) const
template<class Value >
bool Ipc::BaseMultiQueue::pop ( int remoteProcessId,
Value &  value 
)
template<class Value >
bool Ipc::BaseMultiQueue::push ( const int  remoteProcessId,
const Value &  value 
)
const Ipc::QueueReader::Rate & Ipc::BaseMultiQueue::rateLimit ( const int  remoteProcessId) const

Definition at line 161 of file Queue.cc.

References Ipc::QueueReader::rateLimit.

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

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

Referenced by push().

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

Definition at line 192 of file Queue.cc.

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

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

Referenced by peek(), and pop().

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

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

Referenced by peek(), and pop().

Member Data Documentation

int Ipc::BaseMultiQueue::theLastPopProcessId
private

Definition at line 210 of file Queue.h.

Referenced by peek(), and pop().

const int Ipc::BaseMultiQueue::theLocalProcessId
protected

Definition at line 207 of file Queue.h.

Referenced by Ipc::FewToFewBiQueue::findOldest(), pop(), and push().


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors