|
CPN
Computational Process Networks
|
The base class for all queues in the CPN library. More...
#include <QueueBase.h>
Inheritance diagram for CPN::QueueBase:
Collaboration diagram for CPN::QueueBase:Public Member Functions | |
| virtual | ~QueueBase () |
| const void * | GetRawDequeuePtr (unsigned thresh, unsigned chan) |
| void | Dequeue (unsigned count) |
| bool | RawDequeue (void *data, unsigned count, unsigned numChans, unsigned chanStride) |
| bool | RawDequeue (void *data, unsigned count) |
| void * | GetRawEnqueuePtr (unsigned thresh, unsigned chan) |
| void | Enqueue (unsigned count) |
| void | RawEnqueue (const void *data, unsigned count, unsigned numChans, unsigned chanStride) |
| void | RawEnqueue (const void *data, unsigned count) |
| void | Reset () |
| void | Flush () |
| bool | Flushed () const |
| unsigned | NumChannels () const |
| unsigned | Count () const |
| bool | Empty () const |
| unsigned | Freespace () const |
| bool | Full () const |
| unsigned | MaxThreshold () const |
| unsigned | QueueLength () const |
| unsigned | EnqueueChannelStride () const |
| unsigned | DequeueChannelStride () const |
| void | Grow (unsigned queueLen, unsigned maxThresh) |
| Key_t | GetWriterKey () const |
| Key_t | GetReaderKey () const |
| const std::string & | GetDatatype () const |
| void | ShutdownReader () |
| Called by the QueueReader when no more data will be read. More... | |
| void | ShutdownWriter () |
| Called by the QueueWriter when no more data will be written. More... | |
| void | NotifyTerminate () |
| Used to tell any waiting threads that the network is terminating. More... | |
| void | Lock () const |
| void | Unlock () const |
| unsigned | ReadRequest () |
| For unit tests. More... | |
| unsigned | WriteRequest () |
| For unit tests. More... | |
| bool | IsReaderShutdown () |
| bool | IsWriterShutdown () |
| virtual void | LogState () |
| For debugging ONLY!! Otherwise non deterministic output. More... | |
| unsigned | NumEnqueued () const |
| unsigned | NumDequeued () const |
| void | SetReaderNode (shared_ptr< Node > n) |
| void | SetWriterNode (shared_ptr< Node > n) |
| void | SignalReaderTagChanged () |
| void | SignalWriterTagChanged () |
Protected Member Functions | |
| QueueBase (KernelBase *k, const SimpleQueueAttr &attr) | |
| virtual void | WaitForData () |
| virtual bool | ReadBlocked () |
| void | NotifyData () |
| virtual void | WaitForFreespace () |
| virtual bool | WriteBlocked () |
| void | NotifyFreespace () |
| virtual void | Wait () |
| virtual void | Signal () |
| virtual void | Detect () |
| virtual const void * | InternalGetRawDequeuePtr (unsigned thresh, unsigned chan)=0 |
| virtual void | InternalDequeue (unsigned count)=0 |
| virtual void * | InternalGetRawEnqueuePtr (unsigned thresh, unsigned chan)=0 |
| virtual void | InternalEnqueue (unsigned count)=0 |
| virtual void | InternalFlush () |
| virtual void | InternalReset () |
| virtual unsigned | UnlockedNumChannels () const =0 |
| virtual unsigned | UnlockedCount () const =0 |
| virtual bool | UnlockedEmpty () const =0 |
| virtual unsigned | UnlockedFreespace () const =0 |
| virtual bool | UnlockedFull () const =0 |
| virtual unsigned | UnlockedMaxThreshold () const =0 |
| virtual unsigned | UnlockedQueueLength () const =0 |
| virtual unsigned | UnlockedEnqueueChannelStride () const =0 |
| virtual unsigned | UnlockedDequeueChannelStride () const =0 |
| virtual void | UnlockedGrow (unsigned queueLen, unsigned maxThresh)=0 |
| virtual void | UnlockedShutdownReader () |
| virtual void | UnlockedShutdownWriter () |
| virtual unsigned | UnlockedNumEnqueued () const =0 |
| virtual unsigned | UnlockedNumDequeued () const =0 |
| void | ReadBlock () |
| void | WriteBlock (unsigned qsize) |
| virtual void | UnlockedSignalReaderTagChanged () |
| virtual void | UnlockedSignalWriterTagChanged () |
Protected Attributes | |
| const Key_t | readerkey |
| const Key_t | writerkey |
| bool | readshutdown |
| bool | writeshutdown |
| unsigned | prepad |
| unsigned | postpad |
| unsigned | readrequest |
| unsigned | writerequest |
| unsigned | enqueuethresh |
| unsigned | dequeuethresh |
| bool | indequeue |
| bool | inenqueue |
| bool | flushed |
| KernelBase * | kernel |
| bool | useD4R |
| Logger | logger |
| PthreadMutex | lock |
| PthreadCondition | cond |
| std::string | datatype |
| shared_ptr< Node > | reader |
| shared_ptr< Node > | writer |
| bool | readtagchanged |
| bool | writetagchanged |
| bool | incomm |
The base class for all queues in the CPN library.
Definition at line 39 of file QueueBase.h.
|
virtual |
|
protected |
Definition at line 37 of file QueueBase.cc.
References logger, Logger::Name(), readerkey, and writerkey.
Here is the call graph for this function:| unsigned CPN::QueueBase::Count | ( | ) | const |
Definition at line 205 of file QueueBase.cc.
References UnlockedCount().
Here is the call graph for this function:| void CPN::QueueBase::Dequeue | ( | unsigned | count | ) |
This function is used to remove elements from the queue. count elements will be removed from the queue when this function is called.
| count | the number of bytes to remove from the queue |
Definition at line 92 of file QueueBase.cc.
References dequeuethresh, GetRawDequeuePtr(), indequeue, InternalDequeue(), NotifyFreespace(), readerkey, and readshutdown.
Referenced by RawDequeue().
Here is the call graph for this function:
Here is the caller graph for this function:| unsigned CPN::QueueBase::DequeueChannelStride | ( | ) | const |
Definition at line 240 of file QueueBase.cc.
References UnlockedDequeueChannelStride().
Here is the call graph for this function:
|
protectedvirtual |
Called by the D4R algorithm when it has detected an artificial deadlock and this queue should be changed.
Implements D4R::QueueBase.
Definition at line 373 of file QueueBase.cc.
References CPN::KernelBase::CalculateGrowSize(), Logger::Debug(), kernel, logger, UnlockedCount(), UnlockedGrow(), UnlockedMaxThreshold(), UnlockedQueueLength(), and writerequest.
Here is the call graph for this function:| bool CPN::QueueBase::Empty | ( | ) | const |
Definition at line 210 of file QueueBase.cc.
References UnlockedEmpty().
Here is the call graph for this function:| void CPN::QueueBase::Enqueue | ( | unsigned | count | ) |
This function is used to release the buffer obtained with GetRawEnqueuePtr. The count specifies the number of entries that we want to be placed in the buffer.
| count | the number of bytes to be placed in the buffer |
Definition at line 160 of file QueueBase.cc.
References enqueuethresh, inenqueue, InternalEnqueue(), NotifyData(), writerkey, and writeshutdown.
Referenced by CPN::ThresholdQueue::TQImpl::Grow(), and RawEnqueue().
Here is the call graph for this function:
Here is the caller graph for this function:| unsigned CPN::QueueBase::EnqueueChannelStride | ( | ) | const |
Definition at line 235 of file QueueBase.cc.
References UnlockedEnqueueChannelStride().
Here is the call graph for this function:| void CPN::QueueBase::Flush | ( | ) |
Definition at line 186 of file QueueBase.cc.
References InternalFlush().
Here is the call graph for this function:| bool CPN::QueueBase::Flushed | ( | ) | const |
| unsigned CPN::QueueBase::Freespace | ( | ) | const |
Definition at line 215 of file QueueBase.cc.
References UnlockedFreespace().
Here is the call graph for this function:| bool CPN::QueueBase::Full | ( | ) | const |
Definition at line 220 of file QueueBase.cc.
References UnlockedFull().
Here is the call graph for this function:
|
inline |
| const void * CPN::QueueBase::GetRawDequeuePtr | ( | unsigned | thresh, |
| unsigned | chan | ||
| ) |
Get a pointer to a buffer containing elements.
| thresh | the number of bytes to get |
| chan | the channel to use |
Definition at line 63 of file QueueBase.cc.
References ASSERT, CPN::KernelBase::CheckTerminated(), dequeuethresh, flushed, CPN::KernelBase::GrowQueueMaxThreshold(), indequeue, InternalGetRawDequeuePtr(), kernel, readerkey, readrequest, readshutdown, Signal(), UnlockedGrow(), UnlockedMaxThreshold(), WaitForData(), WriteBlocked(), writerequest, and writeshutdown.
Referenced by Dequeue(), and RawDequeue().
Here is the call graph for this function:
Here is the caller graph for this function:| void * CPN::QueueBase::GetRawEnqueuePtr | ( | unsigned | thresh, |
| unsigned | chan | ||
| ) |
Return a pointer to a buffer of memory that contains thresh entries that we can write into.
| thresh | the number bytes we need in the returned buffer. |
| chan | the channel to use |
Definition at line 121 of file QueueBase.cc.
References ASSERT, CPN::KernelBase::CheckTerminated(), enqueuethresh, flushed, CPN::KernelBase::GrowQueueMaxThreshold(), inenqueue, InternalGetRawEnqueuePtr(), kernel, ReadBlocked(), readrequest, readshutdown, Signal(), UnlockedGrow(), UnlockedMaxThreshold(), useD4R, Wait(), WaitForFreespace(), D4R::QueueBase::WriteBlock(), writerequest, writerkey, and writeshutdown.
Referenced by CPN::ThresholdQueue::TQImpl::Grow(), and RawEnqueue().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
|
inline |
| void CPN::QueueBase::Grow | ( | unsigned | queueLen, |
| unsigned | maxThresh | ||
| ) |
Ensure that this queue has at least queueLen bytes of space and can support at least maxThresh as the maxThreshold the new queue length will be max(queueLen, QueueLength()) and the new max threshold will be max(maxThresh, MaxThreshold())
| queueLen | the next queue length |
| maxThresh | the next max threshold |
Definition at line 245 of file QueueBase.cc.
References UnlockedGrow().
Here is the call graph for this function:
|
protectedpure virtual |
Implemented in CPN::RemoteQueue, and CPN::ThresholdQueue.
Referenced by Dequeue().
Here is the caller graph for this function:
|
protectedpure virtual |
Implemented in CPN::RemoteQueue, and CPN::ThresholdQueue.
Referenced by Enqueue(), InternalFlush(), and InternalReset().
Here is the caller graph for this function:
|
protectedvirtual |
Reimplemented in CPN::RemoteQueue.
Definition at line 265 of file QueueBase.cc.
References PthreadCondition::Broadcast(), cond, flushed, InternalEnqueue(), InternalGetRawEnqueuePtr(), postpad, readshutdown, UnlockedEnqueueChannelStride(), UnlockedNumChannels(), WaitForFreespace(), writerequest, writerkey, and writeshutdown.
Referenced by Flush(), and CPN::RemoteQueue::InternalFlush().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedpure virtual |
Implemented in CPN::ThresholdQueue.
Referenced by GetRawDequeuePtr().
Here is the caller graph for this function:
|
protectedpure virtual |
Implemented in CPN::ThresholdQueue.
Referenced by GetRawEnqueuePtr(), InternalFlush(), and InternalReset().
Here is the caller graph for this function:
|
protectedvirtual |
Reimplemented in CPN::RemoteQueue, and CPN::ThresholdQueue.
Definition at line 289 of file QueueBase.cc.
References ASSERT, PthreadCondition::Broadcast(), cond, dequeuethresh, enqueuethresh, flushed, indequeue, inenqueue, InternalEnqueue(), InternalGetRawEnqueuePtr(), prepad, readrequest, UnlockedEnqueueChannelStride(), UnlockedNumChannels(), and writerequest.
Referenced by CPN::ThresholdQueue::InternalReset(), and Reset().
Here is the call graph for this function:
Here is the caller graph for this function:| bool CPN::QueueBase::IsReaderShutdown | ( | ) |
| bool CPN::QueueBase::IsWriterShutdown | ( | ) |
|
inlinevirtual |
These functions are to access the lock for the queue.
Implements D4R::QueueBase.
Definition at line 221 of file QueueBase.h.
References lock, and PthreadMutex::Lock().
Here is the call graph for this function:
|
virtual |
For debugging ONLY!! Otherwise non deterministic output.
Reimplemented in CPN::RemoteQueue.
Definition at line 400 of file QueueBase.cc.
References dequeuethresh, enqueuethresh, Logger::Error(), flushed, indequeue, inenqueue, logger, readerkey, readrequest, readshutdown, UnlockedCount(), UnlockedFreespace(), UnlockedMaxThreshold(), UnlockedNumDequeued(), UnlockedNumEnqueued(), UnlockedQueueLength(), writerequest, writerkey, and writeshutdown.
Referenced by CPN::RemoteQueue::LogState().
Here is the call graph for this function:
Here is the caller graph for this function:| unsigned CPN::QueueBase::MaxThreshold | ( | ) | const |
Definition at line 225 of file QueueBase.cc.
References UnlockedMaxThreshold().
Referenced by CPN::ThresholdQueue::TQImpl::Grow(), and CPN::ThresholdQueue::UnlockedGrow().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Definition at line 341 of file QueueBase.cc.
References PthreadCondition::Broadcast(), cond, readrequest, and UnlockedCount().
Referenced by Enqueue(), and CPN::RemoteQueue::EnqueuePacket().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Definition at line 362 of file QueueBase.cc.
References PthreadCondition::Broadcast(), cond, UnlockedFreespace(), and writerequest.
Referenced by Dequeue(), and CPN::RemoteQueue::SendEnqueuePacket().
Here is the call graph for this function:
Here is the caller graph for this function:| void CPN::QueueBase::NotifyTerminate | ( | ) |
Used to tell any waiting threads that the network is terminating.
Definition at line 368 of file QueueBase.cc.
References PthreadCondition::Broadcast(), and cond.
Here is the call graph for this function:| unsigned CPN::QueueBase::NumChannels | ( | ) | const |
Definition at line 200 of file QueueBase.cc.
References UnlockedNumChannels().
Here is the call graph for this function:| unsigned CPN::QueueBase::NumDequeued | ( | ) | const |
Definition at line 321 of file QueueBase.cc.
References UnlockedNumDequeued().
Here is the call graph for this function:| unsigned CPN::QueueBase::NumEnqueued | ( | ) | const |
Definition at line 316 of file QueueBase.cc.
References UnlockedNumEnqueued().
Here is the call graph for this function:| unsigned CPN::QueueBase::QueueLength | ( | ) | const |
Definition at line 230 of file QueueBase.cc.
References UnlockedQueueLength().
Referenced by CPN::ThresholdQueue::TQImpl::Grow(), CPN::RemoteQueue::GrowPacket(), CPN::ThresholdQueue::UnlockedGrow(), and CPN::RemoteQueue::UnlockedGrow().
Here is the call graph for this function:
Here is the caller graph for this function:| bool CPN::QueueBase::RawDequeue | ( | void * | data, |
| unsigned | count, | ||
| unsigned | numChans, | ||
| unsigned | chanStride | ||
| ) |
Dequeue data from the queue directly into the memory pointed to by data. This function shall be equivalent to a call to GetRawDequeuePtr then a memcpy and then a call to Dequeue.
| data | poiner to memory to dequeue to |
| count | the number of bytes to copy into data |
| numChans | the number of channels to write to |
| chanStride | the distance in bytes between the beginning of the channels in data. |
Definition at line 102 of file QueueBase.cc.
References ASSERT, Dequeue(), and GetRawDequeuePtr().
Referenced by RawDequeue().
Here is the call graph for this function:
Here is the caller graph for this function:| bool CPN::QueueBase::RawDequeue | ( | void * | data, |
| unsigned | count | ||
| ) |
A version of RawDequeue to use when there is only 1 channel.
| data | the data to enqueue |
| count | the number of bytes to enqueue |
Definition at line 117 of file QueueBase.cc.
References RawDequeue().
Here is the call graph for this function:| void CPN::QueueBase::RawEnqueue | ( | const void * | data, |
| unsigned | count, | ||
| unsigned | numChans, | ||
| unsigned | chanStride | ||
| ) |
This function shall be equivalent to a call to GetRqwEnqueuePtr and a memcpy and then a call to Enqueue
The underlying implementatin may implement ether the GetRawEnqueuePtr and Enqueue or RawEnqueue and then implement the other in terms of the one implemented.
| data | pointer to the memory to enqueue |
| count | the number of bytes to enqueue |
| numChans | the number of channels to write to |
| chanStride | the distance in bytes between the beginning of the channels in data. |
Definition at line 169 of file QueueBase.cc.
References Enqueue(), and GetRawEnqueuePtr().
Referenced by RawEnqueue().
Here is the call graph for this function:
Here is the caller graph for this function:| void CPN::QueueBase::RawEnqueue | ( | const void * | data, |
| unsigned | count | ||
| ) |
A version of RawEnqueue to use when there is only 1 channel.
| data | pointer to the memory to enqueue |
| count | the number of bytes to enqueue |
Definition at line 196 of file QueueBase.cc.
References RawEnqueue().
Here is the call graph for this function:
|
protectedinherited |
reader ===> writer ReadBlock requires that you already hold the lock and if it is reentrant then a single unlock will release the lock.
| D4R::DeadlockException |
Definition at line 71 of file D4RQueue.cc.
References D4R::QueueBase::incomm, D4R::QueueBase::ReadBlocked(), D4R::QueueBase::reader, D4R::QueueBase::Signal(), D4R::QueueBase::Wait(), D4R::QueueBase::writer, and D4R::QueueBase::writetagchanged.
Referenced by WaitForData().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedvirtual |
Implements D4R::QueueBase.
Definition at line 336 of file QueueBase.cc.
References CPN::KernelBase::CheckTerminated(), flushed, kernel, readrequest, readshutdown, UnlockedCount(), and writeshutdown.
Referenced by GetRawEnqueuePtr(), CPN::RemoteQueue::WaitForData(), and WaitForData().
Here is the call graph for this function:
Here is the caller graph for this function:| unsigned CPN::QueueBase::ReadRequest | ( | ) |
For unit tests.
Definition at line 380 of file QueueBase.cc.
References readrequest.
| void CPN::QueueBase::Reset | ( | ) |
Definition at line 181 of file QueueBase.cc.
References InternalReset().
Here is the call graph for this function:
|
inherited |
Set the node which is reading from this queue
| n | the node |
Definition at line 59 of file D4RQueue.cc.
References D4R::QueueBase::reader, and D4R::QueueBase::Signal().
Referenced by CPN::RemoteQueue::RemoteQueue().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inherited |
Set the node which is writing to this queue.
| n | the node |
Definition at line 65 of file D4RQueue.cc.
References D4R::QueueBase::Signal(), and D4R::QueueBase::writer.
Referenced by CPN::RemoteQueue::RemoteQueue().
Here is the call graph for this function:
Here is the caller graph for this function:| void CPN::QueueBase::ShutdownReader | ( | ) |
Called by the QueueReader when no more data will be read.
Definition at line 250 of file QueueBase.cc.
References UnlockedShutdownReader().
Referenced by CPN::RemoteQueue::FileThreadEntryPoint().
Here is the call graph for this function:
Here is the caller graph for this function:| void CPN::QueueBase::ShutdownWriter | ( | ) |
Called by the QueueWriter when no more data will be written.
Definition at line 260 of file QueueBase.cc.
References UnlockedShutdownWriter().
Referenced by CPN::RemoteQueue::FileThreadEntryPoint().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprotectedvirtual |
Signal that Wait should return
Implements D4R::QueueBase.
Reimplemented in CPN::RemoteQueue.
Definition at line 247 of file QueueBase.h.
Referenced by GetRawDequeuePtr(), GetRawEnqueuePtr(), CPN::RemoteQueue::Signal(), UnlockedShutdownReader(), and UnlockedShutdownWriter().
Here is the caller graph for this function:
|
inherited |
These functions are called by the D4R::Node when thier tag changes.
Definition at line 139 of file D4RQueue.cc.
References D4R::QueueBase::UnlockedSignalReaderTagChanged().
Here is the call graph for this function:
|
inherited |
Definition at line 150 of file D4RQueue.cc.
References D4R::QueueBase::UnlockedSignalWriterTagChanged().
Here is the call graph for this function:
|
inlinevirtual |
Implements D4R::QueueBase.
Definition at line 222 of file QueueBase.h.
References lock, and PthreadMutex::Unlock().
Here is the call graph for this function:
|
protectedpure virtual |
Implemented in CPN::RemoteQueue, and CPN::ThresholdQueue.
Referenced by Count(), Detect(), LogState(), NotifyData(), and ReadBlocked().
Here is the caller graph for this function:
|
protectedpure virtual |
Implemented in CPN::ThresholdQueue.
Referenced by DequeueChannelStride().
Here is the caller graph for this function:
|
protectedpure virtual |
Implemented in CPN::RemoteQueue, and CPN::ThresholdQueue.
Referenced by Empty().
Here is the caller graph for this function:
|
protectedpure virtual |
Implemented in CPN::ThresholdQueue.
Referenced by EnqueueChannelStride(), InternalFlush(), and InternalReset().
Here is the caller graph for this function:
|
protectedpure virtual |
Implemented in CPN::ThresholdQueue.
Referenced by Freespace(), LogState(), NotifyFreespace(), and WriteBlocked().
Here is the caller graph for this function:
|
protectedpure virtual |
Implemented in CPN::ThresholdQueue.
Referenced by Full().
Here is the caller graph for this function:
|
protectedpure virtual |
Implemented in CPN::RemoteQueue, and CPN::ThresholdQueue.
Referenced by Detect(), GetRawDequeuePtr(), GetRawEnqueuePtr(), and Grow().
Here is the caller graph for this function:
|
protectedpure virtual |
Implemented in CPN::ThresholdQueue.
Referenced by Detect(), GetRawDequeuePtr(), GetRawEnqueuePtr(), LogState(), and MaxThreshold().
Here is the caller graph for this function:
|
protectedpure virtual |
Implemented in CPN::ThresholdQueue.
Referenced by InternalFlush(), InternalReset(), and NumChannels().
Here is the caller graph for this function:
|
protectedpure virtual |
Implemented in CPN::ThresholdQueue.
Referenced by LogState(), and NumDequeued().
Here is the caller graph for this function:
|
protectedpure virtual |
Implemented in CPN::ThresholdQueue.
Referenced by LogState(), and NumEnqueued().
Here is the caller graph for this function:
|
protectedpure virtual |
Implemented in CPN::RemoteQueue, and CPN::ThresholdQueue.
Referenced by Detect(), LogState(), QueueLength(), and WaitForFreespace().
Here is the caller graph for this function:
|
protectedvirtual |
Definition at line 255 of file QueueBase.cc.
References readshutdown, and Signal().
Referenced by CPN::RemoteQueue::EndOfReadPacket(), CPN::RemoteQueue::InternalCheckStatus(), and ShutdownReader().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedvirtual |
Definition at line 311 of file QueueBase.cc.
References Signal(), and writeshutdown.
Referenced by CPN::RemoteQueue::EndOfWritePacket(), CPN::RemoteQueue::InternalCheckStatus(), and ShutdownWriter().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedvirtualinherited |
Reimplemented in CPN::RemoteQueue.
Definition at line 144 of file D4RQueue.cc.
References DEBUG, D4R::QueueBase::reader, D4R::QueueBase::readtagchanged, D4R::QueueBase::Signal(), and D4R::QueueBase::writer.
Referenced by CPN::RemoteQueue::D4RTagPacket(), D4R::QueueBase::SignalReaderTagChanged(), and CPN::RemoteQueue::UnlockedSignalReaderTagChanged().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedvirtualinherited |
Reimplemented in CPN::RemoteQueue.
Definition at line 155 of file D4RQueue.cc.
References DEBUG, D4R::QueueBase::reader, D4R::QueueBase::Signal(), D4R::QueueBase::writer, and D4R::QueueBase::writetagchanged.
Referenced by CPN::RemoteQueue::D4RTagPacket(), D4R::QueueBase::SignalWriterTagChanged(), and CPN::RemoteQueue::UnlockedSignalWriterTagChanged().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprotectedvirtual |
Wait untill Signal is called. Must be holding the lock to call.
Implements D4R::QueueBase.
Definition at line 246 of file QueueBase.h.
References lock.
Referenced by CPN::RemoteQueue::ActionThreadEntryPoint(), GetRawEnqueuePtr(), CPN::RemoteQueue::WaitForData(), and CPN::RemoteQueue::WaitForFreespace().
Here is the caller graph for this function:
|
protectedvirtual |
Reimplemented in CPN::RemoteQueue.
Definition at line 326 of file QueueBase.cc.
References cond, lock, D4R::QueueBase::ReadBlock(), ReadBlocked(), useD4R, and PthreadCondition::Wait().
Referenced by GetRawDequeuePtr(), and CPN::RemoteQueue::WaitForData().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedvirtual |
Reimplemented in CPN::RemoteQueue.
Definition at line 347 of file QueueBase.cc.
References cond, lock, UnlockedQueueLength(), useD4R, PthreadCondition::Wait(), D4R::QueueBase::WriteBlock(), and WriteBlocked().
Referenced by GetRawEnqueuePtr(), InternalFlush(), and CPN::RemoteQueue::WaitForFreespace().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedinherited |
writer ===> reader WriteBlock requires that you already hold the lock and if it is reentrant then a single unlock will release the lock.
Definition at line 106 of file D4RQueue.cc.
References D4R::QueueBase::Detect(), D4R::QueueBase::incomm, D4R::QueueBase::reader, D4R::QueueBase::readtagchanged, D4R::QueueBase::Signal(), D4R::QueueBase::Wait(), D4R::QueueBase::WriteBlocked(), and D4R::QueueBase::writer.
Referenced by GetRawEnqueuePtr(), and WaitForFreespace().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedvirtual |
Implements D4R::QueueBase.
Definition at line 357 of file QueueBase.cc.
References CPN::KernelBase::CheckTerminated(), flushed, kernel, readshutdown, UnlockedFreespace(), writerequest, and writeshutdown.
Referenced by GetRawDequeuePtr(), CPN::RemoteQueue::WaitForFreespace(), and WaitForFreespace().
Here is the call graph for this function:
Here is the caller graph for this function:| unsigned CPN::QueueBase::WriteRequest | ( | ) |
For unit tests.
Definition at line 385 of file QueueBase.cc.
References writerequest.
|
protected |
Definition at line 290 of file QueueBase.h.
Referenced by InternalFlush(), InternalReset(), NotifyData(), NotifyFreespace(), NotifyTerminate(), WaitForData(), and WaitForFreespace().
|
protected |
Definition at line 291 of file QueueBase.h.
|
protected |
Definition at line 282 of file QueueBase.h.
Referenced by Dequeue(), GetRawDequeuePtr(), InternalReset(), LogState(), and CPN::RemoteQueue::ResetPacket().
|
protected |
Definition at line 281 of file QueueBase.h.
Referenced by Enqueue(), GetRawEnqueuePtr(), InternalReset(), LogState(), and CPN::RemoteQueue::ResetPacket().
|
protected |
Definition at line 285 of file QueueBase.h.
Referenced by Flushed(), CPN::RemoteQueue::FlushPacket(), GetRawDequeuePtr(), GetRawEnqueuePtr(), InternalFlush(), InternalReset(), LogState(), ReadBlocked(), CPN::RemoteQueue::ResetPacket(), and WriteBlocked().
|
protectedinherited |
Definition at line 126 of file D4RQueue.h.
Referenced by D4R::QueueBase::ReadBlock(), and D4R::QueueBase::WriteBlock().
|
protected |
Definition at line 283 of file QueueBase.h.
Referenced by Dequeue(), GetRawDequeuePtr(), CPN::ThresholdQueue::InternalGetRawDequeuePtr(), InternalReset(), LogState(), CPN::RemoteQueue::ResetPacket(), CPN::RemoteQueue::SendEnqueuePacket(), and CPN::ThresholdQueue::UnlockedGrow().
|
protected |
Definition at line 284 of file QueueBase.h.
Referenced by Enqueue(), CPN::RemoteQueue::EnqueuePacket(), GetRawEnqueuePtr(), CPN::ThresholdQueue::InternalGetRawEnqueuePtr(), InternalReset(), LogState(), CPN::RemoteQueue::ResetPacket(), and CPN::ThresholdQueue::UnlockedGrow().
|
protected |
Definition at line 286 of file QueueBase.h.
Referenced by Detect(), CPN::RemoteQueue::FileThreadEntryPoint(), GetRawDequeuePtr(), GetRawEnqueuePtr(), CPN::RemoteQueue::InternalCheckStatus(), ReadBlocked(), and WriteBlocked().
|
mutableprotected |
Definition at line 289 of file QueueBase.h.
Referenced by CPN::RemoteQueue::FileThreadEntryPoint(), CPN::RemoteQueue::UnlockedGrow(), WaitForData(), and WaitForFreespace().
|
protected |
Definition at line 288 of file QueueBase.h.
Referenced by CPN::RemoteQueue::D4RTagPacket(), CPN::RemoteQueue::DequeuePacket(), Detect(), CPN::RemoteQueue::EndOfReadPacket(), CPN::RemoteQueue::EndOfWritePacket(), CPN::RemoteQueue::EnqueuePacket(), CPN::RemoteQueue::FileThreadEntryPoint(), CPN::RemoteQueue::FlushPacket(), CPN::RemoteQueue::GrowPacket(), CPN::RemoteQueue::HandleError(), CPN::RemoteQueue::InternalCheckStatus(), CPN::RemoteQueue::InternalDequeue(), CPN::RemoteQueue::InternalEnqueue(), CPN::RemoteQueue::LogState(), LogState(), QueueBase(), CPN::RemoteQueue::Read(), CPN::RemoteQueue::ReadBlockPacket(), CPN::RemoteQueue::RemoteQueue(), CPN::RemoteQueue::ResetPacket(), CPN::RemoteQueue::SendD4RTagPacket(), CPN::RemoteQueue::SendDequeuePacket(), CPN::RemoteQueue::SendEndOfReadPacket(), CPN::RemoteQueue::SendEndOfWritePacket(), CPN::RemoteQueue::SendEnqueuePacket(), CPN::RemoteQueue::SendFlushPacket(), CPN::RemoteQueue::SendGrowPacket(), CPN::RemoteQueue::SendReadBlockPacket(), CPN::RemoteQueue::SendResetPacket(), CPN::RemoteQueue::SendWriteBlockPacket(), CPN::RemoteQueue::UnlockedGrow(), CPN::RemoteQueue::UnlockedShutdown(), CPN::RemoteQueue::UnlockedSignalReaderTagChanged(), CPN::RemoteQueue::UnlockedSignalWriterTagChanged(), CPN::RemoteQueue::WaitForData(), CPN::RemoteQueue::WaitForFreespace(), CPN::RemoteQueue::WriteBlockPacket(), and CPN::RemoteQueue::~RemoteQueue().
|
protected |
Definition at line 278 of file QueueBase.h.
Referenced by InternalFlush().
|
protected |
Definition at line 277 of file QueueBase.h.
Referenced by InternalReset().
|
protectedinherited |
Definition at line 122 of file D4RQueue.h.
Referenced by CPN::RemoteQueue::InternalCheckStatus(), D4R::QueueBase::ReadBlock(), CPN::RemoteQueue::SendD4RTagPacket(), D4R::QueueBase::SetReaderNode(), D4R::QueueBase::UnlockedSignalReaderTagChanged(), D4R::QueueBase::UnlockedSignalWriterTagChanged(), and D4R::QueueBase::WriteBlock().
|
protected |
Definition at line 273 of file QueueBase.h.
Referenced by Dequeue(), CPN::RemoteQueue::GetKey(), GetRawDequeuePtr(), LogState(), QueueBase(), and CPN::RemoteQueue::RemoteQueue().
|
protected |
Definition at line 279 of file QueueBase.h.
Referenced by CPN::RemoteQueue::DequeuePacket(), GetRawDequeuePtr(), GetRawEnqueuePtr(), CPN::RemoteQueue::GetState(), CPN::RemoteQueue::InternalCheckStatus(), InternalReset(), LogState(), NotifyData(), ReadBlocked(), CPN::RemoteQueue::ReadBlockPacket(), ReadRequest(), CPN::RemoteQueue::ResetPacket(), and CPN::RemoteQueue::SendReadBlockPacket().
|
protected |
Definition at line 275 of file QueueBase.h.
Referenced by Dequeue(), CPN::RemoteQueue::DequeuePacket(), CPN::RemoteQueue::EndOfReadPacket(), GetRawDequeuePtr(), GetRawEnqueuePtr(), CPN::RemoteQueue::GetState(), CPN::RemoteQueue::HandleError(), CPN::RemoteQueue::InternalCheckStatus(), InternalFlush(), IsReaderShutdown(), LogState(), ReadBlocked(), CPN::RemoteQueue::ReadBlockPacket(), UnlockedShutdownReader(), and WriteBlocked().
|
protectedinherited |
Definition at line 124 of file D4RQueue.h.
Referenced by D4R::QueueBase::UnlockedSignalReaderTagChanged(), and D4R::QueueBase::WriteBlock().
|
protected |
Definition at line 287 of file QueueBase.h.
Referenced by GetRawEnqueuePtr(), CPN::RemoteQueue::ReadBlockPacket(), WaitForData(), WaitForFreespace(), and CPN::RemoteQueue::WriteBlockPacket().
|
protectedinherited |
Definition at line 123 of file D4RQueue.h.
Referenced by CPN::RemoteQueue::InternalCheckStatus(), D4R::QueueBase::ReadBlock(), CPN::RemoteQueue::SendD4RTagPacket(), D4R::QueueBase::SetWriterNode(), D4R::QueueBase::UnlockedSignalReaderTagChanged(), D4R::QueueBase::UnlockedSignalWriterTagChanged(), and D4R::QueueBase::WriteBlock().
|
protected |
Definition at line 280 of file QueueBase.h.
Referenced by Detect(), CPN::RemoteQueue::EnqueuePacket(), GetRawDequeuePtr(), GetRawEnqueuePtr(), CPN::RemoteQueue::GetState(), CPN::RemoteQueue::InternalCheckStatus(), InternalFlush(), InternalReset(), LogState(), NotifyFreespace(), CPN::RemoteQueue::ResetPacket(), CPN::RemoteQueue::SendWriteBlockPacket(), WriteBlocked(), CPN::RemoteQueue::WriteBlockPacket(), and WriteRequest().
|
protected |
Definition at line 274 of file QueueBase.h.
Referenced by Enqueue(), CPN::RemoteQueue::GetKey(), GetRawEnqueuePtr(), InternalFlush(), LogState(), QueueBase(), and CPN::RemoteQueue::RemoteQueue().
|
protected |
Definition at line 276 of file QueueBase.h.
Referenced by CPN::RemoteQueue::EndOfWritePacket(), Enqueue(), CPN::RemoteQueue::EnqueuePacket(), GetRawDequeuePtr(), GetRawEnqueuePtr(), CPN::RemoteQueue::GetState(), CPN::RemoteQueue::HandleError(), CPN::RemoteQueue::InternalCheckStatus(), InternalFlush(), IsWriterShutdown(), LogState(), ReadBlocked(), UnlockedShutdownWriter(), WriteBlocked(), and CPN::RemoteQueue::WriteBlockPacket().
|
protectedinherited |
Definition at line 125 of file D4RQueue.h.
Referenced by D4R::QueueBase::ReadBlock(), and D4R::QueueBase::UnlockedSignalWriterTagChanged().
1.8.5