#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...
 
void clearAllReaderSignals ()
 clears all reader notifications received by the local 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...
 
template<class Value >
void stat (std::ostream &) const
 prints current state; suitable for cache manager reports 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 167 of file Queue.h.

Constructor & Destructor Documentation

◆ BaseMultiQueue()

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

Definition at line 152 of file Queue.cc.

◆ ~BaseMultiQueue()

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

Definition at line 171 of file Queue.h.

Member Function Documentation

◆ balance()

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

Definition at line 180 of file Queue.cc.

References Ipc::QueueReader::balance.

◆ clearAllReaderSignals()

void Ipc::BaseMultiQueue::clearAllReaderSignals ( )

Definition at line 172 of file Queue.cc.

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

◆ clearReaderSignal()

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

Definition at line 159 of file Queue.cc.

◆ inQueue() [1/2]

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

Definition at line 194 of file Queue.cc.

◆ inQueue() [2/2]

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

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

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

◆ inSize()

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

Definition at line 204 of file Queue.h.

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

◆ localBalance()

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

Definition at line 192 of file Queue.h.

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

◆ localRateLimit()

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

Definition at line 198 of file Queue.h.

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

◆ localReader() [1/2]

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

Definition at line 210 of file Queue.cc.

◆ localReader() [2/2]

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

◆ outQueue() [1/2]

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

Definition at line 202 of file Queue.cc.

◆ outQueue() [2/2]

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

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

Referenced by outSize(), push(), and stat().

◆ outSize()

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

Definition at line 207 of file Queue.h.

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

◆ peek()

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

◆ pop()

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

◆ push()

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

◆ rateLimit()

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

Definition at line 187 of file Queue.cc.

References Ipc::QueueReader::rateLimit.

◆ remoteReader() [1/2]

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

Definition at line 218 of file Queue.cc.

◆ remoteReader() [2/2]

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

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

Referenced by push().

◆ remotesCount()

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

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

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

◆ remotesIdOffset()

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

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

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

◆ stat()

template<class Value >
void Ipc::BaseMultiQueue::stat ( std::ostream &  os) const

Member Data Documentation

◆ theLastPopProcessId

int Ipc::BaseMultiQueue::theLastPopProcessId
private

Definition at line 231 of file Queue.h.

Referenced by peek(), and pop().

◆ theLocalProcessId

const int Ipc::BaseMultiQueue::theLocalProcessId
protected

Definition at line 228 of file Queue.h.

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


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors