|
Squid Web Cache master
|
#include <Queue.h>
Classes | |
| struct | Metadata |
| Shared metadata for MultiQueue. More... | |
| class | Owner |
Public Types | |
| typedef OneToOneUniQueue::Full | Full |
| typedef OneToOneUniQueue::ItemTooLarge | ItemTooLarge |
Public Member Functions | |
| MultiQueue (const String &id, const int localProcessId) | |
| void | clearReaderSignal (const int remoteProcessId) |
| clears the reader notification received by the local process from the remote process | |
| void | clearAllReaderSignals () |
| clears all reader notifications received by the local process | |
| template<class Value > | |
| bool | pop (int &remoteProcessId, Value &value) |
| picks a process and calls OneToOneUniQueue::pop() using its queue | |
| template<class Value > | |
| bool | push (const int remoteProcessId, const Value &value) |
| calls OneToOneUniQueue::push() using the given process queue | |
| template<class Value > | |
| bool | peek (int &remoteProcessId, Value &value) const |
| peeks at the item likely to be pop()ed next | |
| template<class Value > | |
| void | stat (std::ostream &) const |
| prints current state; suitable for cache manager reports | |
| QueueReader::Balance & | localBalance () |
| returns local reader's balance | |
| const QueueReader::Balance & | balance (const int remoteProcessId) const |
| returns reader's balance for a given remote process | |
| QueueReader::Rate & | localRateLimit () |
| returns local reader's rate limit | |
| const QueueReader::Rate & | rateLimit (const int remoteProcessId) const |
| returns reader's rate limit for a given remote process | |
| int | inSize (const int remoteProcessId) const |
| number of items in incoming queue from a given remote process | |
| int | outSize (const int remoteProcessId) const |
| number of items in outgoing queue to a given remote process | |
Static Public Member Functions | |
| static Owner * | Init (const String &id, const int processCount, const int processIdOffset, const unsigned int maxItemSize, const int capacity) |
Protected Member Functions | |
| const OneToOneUniQueue & | inQueue (const int remoteProcessId) const override |
| incoming queue from a given remote process | |
| const OneToOneUniQueue & | outQueue (const int remoteProcessId) const override |
| outgoing queue to a given remote process | |
| const QueueReader & | localReader () const override |
| const QueueReader & | remoteReader (const int remoteProcessId) const override |
| int | remotesCount () const override |
| int | remotesIdOffset () const override |
| OneToOneUniQueue & | inQueue (const int remoteProcessId) |
| OneToOneUniQueue & | outQueue (const int remoteProcessId) |
| QueueReader & | localReader () |
| QueueReader & | remoteReader (const int remoteProcessId) |
Protected Attributes | |
| const int | theLocalProcessId |
| process ID of this queue | |
Private Member Functions | |
| bool | validProcessId (const int processId) const |
| const OneToOneUniQueue & | oneToOneQueue (const int fromProcessId, const int toProcessId) const |
| const QueueReader & | reader (const int processId) const |
Private Attributes | |
| const Mem::Pointer< Metadata > | metadata |
| shared metadata | |
| const Mem::Pointer< OneToOneUniQueues > | queues |
| unidirection one-to-one queues | |
| const Mem::Pointer< QueueReaders > | readers |
| readers array | |
| int | theLastPopProcessId |
| the ID of the last process we tried to pop() from | |
Lockless fixed-capacity bidirectional queue for a limited number processes. Any process may send data to and receive from any other process (including itself). Each process has a unique integer ID in [processIdOffset, processIdOffset + processCount) range.
|
inherited |
Definition at line 180 of file Queue.cc.
References Ipc::QueueReader::balance.
|
inherited |
Definition at line 172 of file Queue.cc.
References Ipc::QueueReader::clearSignal(), debugs, and Ipc::QueueReader::id.
|
inherited |
|
static |
Definition at line 368 of file Queue.cc.
Referenced by CollapsedForwardingRr::create().
|
protectedinherited |
|
overrideprotectedvirtual |
Implements Ipc::BaseMultiQueue.
Definition at line 204 of file Queue.h.
References Ipc::BaseMultiQueue::inQueue(), and Ipc::OneToOneUniQueue::size().
|
inlineinherited |
Definition at line 192 of file Queue.h.
References Ipc::QueueReader::balance, and Ipc::BaseMultiQueue::localReader().
|
inlineinherited |
Definition at line 198 of file Queue.h.
References Ipc::BaseMultiQueue::localReader(), and Ipc::QueueReader::rateLimit.
|
protectedinherited |
|
overrideprotectedvirtual |
Implements Ipc::BaseMultiQueue.
Definition at line 424 of file Queue.cc.
Referenced by MultiQueue().
|
private |
|
protectedinherited |
|
overrideprotectedvirtual |
Implements Ipc::BaseMultiQueue.
Definition at line 207 of file Queue.h.
References Ipc::BaseMultiQueue::outQueue(), and Ipc::OneToOneUniQueue::size().
|
inherited |
Definition at line 568 of file Queue.h.
References Ipc::BaseMultiQueue::inQueue(), Ipc::OneToOneUniQueue::peek(), Ipc::BaseMultiQueue::remotesCount(), Ipc::BaseMultiQueue::remotesIdOffset(), and Ipc::BaseMultiQueue::theLastPopProcessId.
|
inherited |
Definition at line 540 of file Queue.h.
References debugs, Ipc::BaseMultiQueue::inQueue(), Ipc::BaseMultiQueue::localReader(), Ipc::OneToOneUniQueue::pop(), Ipc::BaseMultiQueue::remotesCount(), Ipc::BaseMultiQueue::remotesIdOffset(), Ipc::OneToOneUniQueue::size(), Ipc::BaseMultiQueue::theLastPopProcessId, and Ipc::BaseMultiQueue::theLocalProcessId.
|
inherited |
Definition at line 558 of file Queue.h.
References debugs, Ipc::BaseMultiQueue::outQueue(), Ipc::OneToOneUniQueue::push(), Ipc::BaseMultiQueue::remoteReader(), Ipc::OneToOneUniQueue::size(), and Ipc::BaseMultiQueue::theLocalProcessId.
|
inherited |
Definition at line 187 of file Queue.cc.
References Ipc::QueueReader::rateLimit.
|
private |
|
protectedinherited |
|
overrideprotectedvirtual |
Implements Ipc::BaseMultiQueue.
|
overrideprotectedvirtual |
Implements Ipc::BaseMultiQueue.
|
overrideprotectedvirtual |
Implements Ipc::BaseMultiQueue.
|
inherited |
Definition at line 586 of file Queue.h.
References Ipc::BaseMultiQueue::inQueue(), Ipc::BaseMultiQueue::localReader(), Ipc::BaseMultiQueue::outQueue(), Ipc::BaseMultiQueue::remotesCount(), Ipc::BaseMultiQueue::remotesIdOffset(), and Ipc::BaseMultiQueue::theLocalProcessId.
|
private |
|
private |
Definition at line 364 of file Queue.h.
Referenced by MultiQueue().
|
private |
Definition at line 365 of file Queue.h.
Referenced by MultiQueue().
|
private |
Definition at line 366 of file Queue.h.
Referenced by MultiQueue().
|
privateinherited |
Definition at line 231 of file Queue.h.
Referenced by Ipc::BaseMultiQueue::peek(), and Ipc::BaseMultiQueue::pop().
|
protectedinherited |
Definition at line 228 of file Queue.h.
Referenced by Ipc::FewToFewBiQueue::findOldest(), Ipc::BaseMultiQueue::pop(), Ipc::BaseMultiQueue::push(), and Ipc::BaseMultiQueue::stat().