|
CPN
Computational Process Networks
|
#include <RemoteQueue.h>
Inheritance diagram for CPN::RemoteQueue:
Collaboration diagram for CPN::RemoteQueue:Public Types | |
| enum | Mode_t { READ, WRITE } |
Public Member Functions | |
| RemoteQueue (KernelBase *k, Mode_t mode, ConnectionServer *s, RemoteQueueHolder *h, const SimpleQueueAttr &attr, bool usembs) | |
| ~RemoteQueue () | |
| void | Start () |
| Mode_t | GetMode () const |
| Key_t | GetKey () const |
| void | Shutdown () |
| void | LogState () |
| For debug ONLY! More... | |
| 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 () |
| 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 | |
| virtual void * | InternalGetRawEnqueuePtr (unsigned thresh, unsigned chan) |
| virtual const void * | InternalGetRawDequeuePtr (unsigned thresh, unsigned chan) |
| virtual unsigned | UnlockedNumChannels () const |
| virtual unsigned | UnlockedMaxThreshold () const |
| virtual unsigned | UnlockedFreespace () const |
| virtual bool | UnlockedFull () const |
| virtual unsigned | UnlockedEnqueueChannelStride () const |
| virtual unsigned | UnlockedDequeueChannelStride () const |
| unsigned | UnlockedNumEnqueued () const |
| unsigned | UnlockedNumDequeued () const |
| virtual bool | ReadBlocked () |
| void | NotifyData () |
| virtual bool | WriteBlocked () |
| void | NotifyFreespace () |
| virtual void | Wait () |
| virtual void | Detect () |
| virtual void | UnlockedShutdownReader () |
| virtual void | UnlockedShutdownWriter () |
| void | ReadBlock () |
| void | WriteBlock (unsigned qsize) |
Protected Attributes | |
| TQImpl * | queue |
| TQImpl * | oldqueue |
| bool | enqueueUseOld |
| bool | dequeueUseOld |
| 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 |
Private Member Functions | |
| void | UnlockedShutdown () |
| unsigned | UnlockedCount () const |
| bool | UnlockedEmpty () const |
| unsigned | UnlockedQueueLength () const |
| void | UnlockedGrow (unsigned queueLen, unsigned maxThresh) |
| void | Signal () |
| void | WaitForData () |
| void | WaitForFreespace () |
| void | InternalDequeue (unsigned count) |
| void | InternalEnqueue (unsigned count) |
| void | InternalFlush () |
| void | InternalReset () |
| void | UnlockedSignalReaderTagChanged () |
| void | UnlockedSignalWriterTagChanged () |
| void | SetupPacket (Packet &packet) |
| void | EnqueuePacket (const Packet &packet) |
| void | SendEnqueuePacket () |
| void | DequeuePacket (const Packet &packet) |
| void | SendDequeuePacket () |
| void | ReadBlockPacket (const Packet &packet) |
| void | SendReadBlockPacket () |
| void | WriteBlockPacket (const Packet &packet) |
| void | SendWriteBlockPacket () |
| void | EndOfWritePacket (const Packet &packet) |
| void | SendEndOfWritePacket () |
| void | EndOfReadPacket (const Packet &packet) |
| void | SendEndOfReadPacket () |
| void | GrowPacket (const Packet &packet) |
| void | SendGrowPacket () |
| void | D4RTagPacket (const Packet &packet) |
| void | SendD4RTagPacket () |
| void | FlushPacket (const Packet &packet) |
| void | SendFlushPacket () |
| void | ResetPacket (const Packet &packet) |
| void | SendResetPacket () |
| void | IDReaderPacket (const Packet &packet) |
| void | IDWriterPacket (const Packet &packet) |
| void | Read () |
| void | WriteBytes (const iovec *iov, unsigned iovcnt) |
| void * | FileThreadEntryPoint () |
| void * | ActionThreadEntryPoint () |
| void | InternalCheckStatus () |
| void | UpdateClock (const Packet &packet) |
| void | TickClock () |
| std::string | ClockString () const |
| void | HandleError (const ErrnoException &e) |
| std::string | GetState () |
| For debugging. More... | |
| template<typename Queue_t > | |
| void | SendEnqueue (const Packet &packet, Queue_t &queue) |
| void | SendPacket (const Packet &packet) |
| void | SendPacket (const Packet &packet, void *data) |
| void * | GetDecoderBytes (unsigned &amount) |
| void | ReleaseDecoderBytes (unsigned amount) |
| void | Reset () |
| unsigned | NumBytes () const |
| void | FirePacket (const Packet &packet) |
Static Private Member Functions | |
| static unsigned | QueueLength (unsigned length, unsigned maxthresh, double alpha, Mode_t mode) |
Private Attributes | |
| auto_ptr< Pthread > | fileThread |
| auto_ptr< Pthread > | actionThread |
| bool | pendingAction |
| bool | actionTick |
| PthreadCondition | actionCond |
| const Mode_t | mode |
| const double | alpha |
| unsigned | maxwritethreshold |
| ConnectionServer *const | server |
| RemoteQueueHolder *const | holder |
| SocketHandle | sock |
| shared_ptr< D4R::Node > | mocknode |
| uint64_t | clock |
| uint64_t | readclock |
| uint64_t | writeclock |
| unsigned | readerlength |
| unsigned | writerlength |
| unsigned | bytecount |
| bool | pendingBlock |
| bool | sentEnd |
| bool | pendingGrow |
| bool | pendingD4RTag |
| bool | tagUpdated |
| bool | pendingFlush |
| bool | pendingReset |
| bool | dead |
The RemoteQueue is a specialization of the ThresholdQueue which is split in half across a socket. This class works closely with ConnectionServer and RemoteQueueHolder.
Definition at line 49 of file RemoteQueue.h.
| Enumerator | |
|---|---|
| READ | |
| WRITE | |
Definition at line 57 of file RemoteQueue.h.
| CPN::RemoteQueue::RemoteQueue | ( | KernelBase * | k, |
| Mode_t | mode, | ||
| ConnectionServer * | s, | ||
| RemoteQueueHolder * | h, | ||
| const SimpleQueueAttr & | attr, | ||
| bool | usembs | ||
| ) |
Definition at line 49 of file RemoteQueue.cc.
References actionThread, ActionThreadEntryPoint(), CreatePthreadFunctional(), fileThread, FileThreadEntryPoint(), CPN::QueueBase::logger, mocknode, mode, Logger::Name(), READ, CPN::QueueBase::readerkey, D4R::QueueBase::SetReaderNode(), D4R::QueueBase::SetWriterNode(), Logger::Trace(), and CPN::QueueBase::writerkey.
Here is the call graph for this function:| CPN::RemoteQueue::~RemoteQueue | ( | ) |
Definition at line 94 of file RemoteQueue.cc.
References actionCond, actionThread, ASSERT_ABORT, PthreadCondition::Broadcast(), ClockString(), dead, fileThread, FUNC_TRACE, CPN::QueueBase::logger, Signal(), and Logger::Trace().
Here is the call graph for this function:
|
private |
Definition at line 662 of file RemoteQueue.cc.
References actionCond, actionTick, PthreadCondition::Broadcast(), dead, InternalCheckStatus(), pendingAction, and CPN::QueueBase::Wait().
Referenced by RemoteQueue().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 819 of file RemoteQueue.cc.
References clock, readclock, and writeclock.
Referenced by FileThreadEntryPoint(), GetState(), HandleError(), InternalCheckStatus(), LogState(), and ~RemoteQueue().
Here is the caller graph for this function:
|
inherited |
Definition at line 205 of file QueueBase.cc.
References CPN::QueueBase::UnlockedCount().
Here is the call graph for this function:
|
privatevirtual |
Implements CPN::PacketHandler.
Definition at line 458 of file RemoteQueue.cc.
References ASSERT, CPN::Packet::DataLength(), FUNC_TRACE, CPN::QueueBase::logger, mocknode, mode, FileHandle::Read(), Signal(), sock, tagUpdated, D4R::QueueBase::UnlockedSignalReaderTagChanged(), D4R::QueueBase::UnlockedSignalWriterTagChanged(), UpdateClock(), and WRITE.
Here is the call graph for this function:
|
inherited |
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 CPN::QueueBase::dequeuethresh, CPN::QueueBase::GetRawDequeuePtr(), CPN::QueueBase::indequeue, CPN::QueueBase::InternalDequeue(), CPN::QueueBase::NotifyFreespace(), CPN::QueueBase::readerkey, and CPN::QueueBase::readshutdown.
Referenced by CPN::QueueBase::RawDequeue().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inherited |
Definition at line 240 of file QueueBase.cc.
References CPN::QueueBase::UnlockedDequeueChannelStride().
Here is the call graph for this function:
|
privatevirtual |
Implements CPN::PacketHandler.
Definition at line 335 of file RemoteQueue.cc.
References ASSERT, bytecount, CPN::Packet::Count(), FUNC_TRACE, CPN::QueueBase::logger, mode, CPN::QueueBase::readrequest, CPN::QueueBase::readshutdown, UpdateClock(), and WRITE.
Here is the call graph for this function:
|
protectedvirtualinherited |
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(), CPN::QueueBase::kernel, CPN::QueueBase::logger, CPN::QueueBase::UnlockedCount(), CPN::QueueBase::UnlockedGrow(), CPN::QueueBase::UnlockedMaxThreshold(), CPN::QueueBase::UnlockedQueueLength(), and CPN::QueueBase::writerequest.
Here is the call graph for this function:
|
inherited |
Definition at line 210 of file QueueBase.cc.
References CPN::QueueBase::UnlockedEmpty().
Here is the call graph for this function:
|
privatevirtual |
Implements CPN::PacketHandler.
Definition at line 417 of file RemoteQueue.cc.
References ASSERT, FUNC_TRACE, CPN::QueueBase::logger, mode, CPN::QueueBase::readshutdown, CPN::QueueBase::UnlockedShutdownReader(), UpdateClock(), and WRITE.
Here is the call graph for this function:
|
privatevirtual |
Implements CPN::PacketHandler.
Definition at line 396 of file RemoteQueue.cc.
References ASSERT, FUNC_TRACE, CPN::QueueBase::logger, mode, READ, CPN::QueueBase::UnlockedShutdownWriter(), UpdateClock(), and CPN::QueueBase::writeshutdown.
Here is the call graph for this function:
|
inherited |
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 CPN::QueueBase::enqueuethresh, CPN::QueueBase::inenqueue, CPN::QueueBase::InternalEnqueue(), CPN::QueueBase::NotifyData(), CPN::QueueBase::writerkey, and CPN::QueueBase::writeshutdown.
Referenced by CPN::ThresholdQueue::TQImpl::Grow(), and CPN::QueueBase::RawEnqueue().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inherited |
Definition at line 235 of file QueueBase.cc.
References CPN::QueueBase::UnlockedEnqueueChannelStride().
Here is the call graph for this function:
|
privatevirtual |
Implements CPN::PacketHandler.
Definition at line 242 of file RemoteQueue.cc.
References ASSERT, bytecount, clock, ThresholdQueueBase::Count(), CPN::Packet::Count(), CPN::Packet::DataLength(), FileHandle::Eof(), ThresholdQueueBase::Freespace(), FUNC_TRACE, CPN::QueueBase::inenqueue, CPN::ThresholdQueue::InternalEnqueue(), CPN::ThresholdQueue::InternalGetRawEnqueuePtr(), CPN::QueueBase::logger, ThresholdQueueBase::MaxThreshold(), mode, CPN::QueueBase::NotifyData(), ThresholdQueueBase::NumChannels(), CPN::ThresholdQueue::queue, ThresholdQueueBase::QueueLength(), READ, readclock, FileHandle::Readv(), sock, CPN::ThresholdQueue::UnlockedGrow(), UpdateClock(), Logger::Warn(), writeclock, CPN::QueueBase::writerequest, and CPN::QueueBase::writeshutdown.
Here is the call graph for this function:
|
private |
Definition at line 583 of file RemoteQueue.cc.
References actionCond, actionThread, actionTick, CPN::RemoteQueueHolder::CleanupQueue(), ClockString(), FileHandle::Closed(), CPN::ConnectionServer::ConnectReader(), CPN::ConnectionServer::ConnectWriter(), dead, Logger::Debug(), Logger::Error(), FileHandle::FD(), GetKey(), CPN::RemoteQueueHolder::GetWakeup(), HandleError(), holder, CPN::KernelBase::IsTerminated(), CPN::QueueBase::kernel, CPN::QueueBase::lock, CPN::QueueBase::logger, mode, FileHandle::Poll(), FileHandle::Reset(), server, SocketHandle::SetNoDelay(), Shutdown(), CPN::QueueBase::ShutdownReader(), CPN::QueueBase::ShutdownWriter(), Signal(), sock, PthreadCondition::Wait(), CPN::ConnectionServer::Wakeup(), ErrnoException::what(), and WRITE.
Referenced by RemoteQueue().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inherited |
Definition at line 31 of file PacketHeader.cc.
References ASSERT, CPN::PacketHandler::D4RTagPacket(), CPN::PacketHandler::DequeuePacket(), CPN::PacketHandler::EndOfReadPacket(), CPN::PacketHandler::EndOfWritePacket(), CPN::PacketHandler::EnqueuePacket(), CPN::PacketHandler::FlushPacket(), CPN::PacketHandler::GrowPacket(), CPN::PacketHandler::IDReaderPacket(), CPN::PacketHandler::IDWriterPacket(), CPN::PACKET_D4RTAG, CPN::PACKET_DEQUEUE, CPN::PACKET_ENDOFREAD, CPN::PACKET_ENDOFWRITE, CPN::PACKET_ENQUEUE, CPN::PACKET_FLUSH, CPN::PACKET_GROW, CPN::PACKET_ID_READER, CPN::PACKET_ID_WRITER, CPN::PACKET_READBLOCK, CPN::PACKET_RESET, CPN::PACKET_WRITEBLOCK, CPN::PacketHandler::ReadBlockPacket(), CPN::PacketHandler::ResetPacket(), CPN::Packet::Type(), CPN::Packet::Valid(), and CPN::PacketHandler::WriteBlockPacket().
Referenced by CPN::PacketDecoder::ReleaseDecoderBytes().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inherited |
Definition at line 186 of file QueueBase.cc.
References CPN::QueueBase::InternalFlush().
Here is the call graph for this function:
|
inherited |
Definition at line 191 of file QueueBase.cc.
References CPN::QueueBase::flushed.
|
privatevirtual |
Implements CPN::PacketHandler.
Definition at line 489 of file RemoteQueue.cc.
References CPN::QueueBase::flushed, FUNC_TRACE, CPN::QueueBase::logger, Signal(), and UpdateClock().
Here is the call graph for this function:
|
inherited |
Definition at line 215 of file QueueBase.cc.
References CPN::QueueBase::UnlockedFreespace().
Here is the call graph for this function:
|
inherited |
Definition at line 220 of file QueueBase.cc.
References CPN::QueueBase::UnlockedFull().
Here is the call graph for this function:
|
inlineinherited |
|
inherited |
Definition at line 37 of file PacketDecoder.cc.
References ASSERT, CPN::PacketDecoder::header, CPN::Packet::header, and CPN::PacketDecoder::numbytes.
Referenced by Read().
Here is the caller graph for this function:
|
inlinevirtual |
Implements CPN::RemoteQueueBase.
Definition at line 74 of file RemoteQueue.h.
References mode, READ, CPN::QueueBase::readerkey, and CPN::QueueBase::writerkey.
Referenced by FileThreadEntryPoint().
Here is the caller graph for this function:
|
inline |
|
inherited |
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(), CPN::QueueBase::dequeuethresh, CPN::QueueBase::flushed, CPN::KernelBase::GrowQueueMaxThreshold(), CPN::QueueBase::indequeue, CPN::QueueBase::InternalGetRawDequeuePtr(), CPN::QueueBase::kernel, CPN::QueueBase::readerkey, CPN::QueueBase::readrequest, CPN::QueueBase::readshutdown, CPN::QueueBase::Signal(), CPN::QueueBase::UnlockedGrow(), CPN::QueueBase::UnlockedMaxThreshold(), CPN::QueueBase::WaitForData(), CPN::QueueBase::WriteBlocked(), CPN::QueueBase::writerequest, and CPN::QueueBase::writeshutdown.
Referenced by CPN::QueueBase::Dequeue(), and CPN::QueueBase::RawDequeue().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inherited |
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(), CPN::QueueBase::enqueuethresh, CPN::QueueBase::flushed, CPN::KernelBase::GrowQueueMaxThreshold(), CPN::QueueBase::inenqueue, CPN::QueueBase::InternalGetRawEnqueuePtr(), CPN::QueueBase::kernel, CPN::QueueBase::ReadBlocked(), CPN::QueueBase::readrequest, CPN::QueueBase::readshutdown, CPN::QueueBase::Signal(), CPN::QueueBase::UnlockedGrow(), CPN::QueueBase::UnlockedMaxThreshold(), CPN::QueueBase::useD4R, CPN::QueueBase::Wait(), CPN::QueueBase::WaitForFreespace(), D4R::QueueBase::WriteBlock(), CPN::QueueBase::writerequest, CPN::QueueBase::writerkey, and CPN::QueueBase::writeshutdown.
Referenced by CPN::ThresholdQueue::TQImpl::Grow(), and CPN::QueueBase::RawEnqueue().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineinherited |
|
private |
For debugging.
Definition at line 867 of file RemoteQueue.cc.
References bytecount, ClockString(), dead, mode, pendingBlock, pendingD4RTag, pendingGrow, READ, readerlength, CPN::QueueBase::readrequest, CPN::QueueBase::readshutdown, sentEnd, UnlockedCount(), CPN::ThresholdQueue::UnlockedFreespace(), CPN::ThresholdQueue::UnlockedMaxThreshold(), CPN::ThresholdQueue::UnlockedNumDequeued(), CPN::ThresholdQueue::UnlockedNumEnqueued(), UnlockedQueueLength(), CPN::QueueBase::writerequest, writerlength, and CPN::QueueBase::writeshutdown.
Here is the call graph for this function:
|
inlineinherited |
|
inherited |
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 CPN::QueueBase::UnlockedGrow().
Here is the call graph for this function:
|
privatevirtual |
Implements CPN::PacketHandler.
Definition at line 438 of file RemoteQueue.cc.
References alpha, FUNC_TRACE, CPN::QueueBase::logger, ThresholdQueueBase::MaxThreshold(), CPN::Packet::MaxThreshold(), mode, CPN::ThresholdQueue::queue, CPN::QueueBase::QueueLength(), CPN::Packet::QueueSize(), READ, readerlength, CPN::ThresholdQueue::UnlockedGrow(), UpdateClock(), WRITE, and writerlength.
Here is the call graph for this function:
|
private |
Definition at line 825 of file RemoteQueue.cc.
References actionCond, PthreadCondition::Broadcast(), ClockString(), FileHandle::Close(), dead, ErrnoException::Error(), Logger::Error(), CPN::QueueBase::logger, CPN::QueueBase::readshutdown, Signal(), sock, ErrnoException::what(), and CPN::QueueBase::writeshutdown.
Referenced by FileThreadEntryPoint(), and InternalCheckStatus().
Here is the call graph for this function:
Here is the caller graph for this function:
|
privatevirtual |
|
privatevirtual |
|
private |
Definition at line 676 of file RemoteQueue.cc.
References actionCond, ASSERT, PthreadCondition::Broadcast(), bytecount, ClockString(), FileHandle::Close(), FileHandle::Closed(), ThresholdQueueBase::Count(), dead, Logger::DEBUG, Logger::Debug(), ThresholdQueueBase::Empty(), FileHandle::Eof(), Logger::Error(), ThresholdQueueBase::Freespace(), HandleError(), CPN::KernelBase::IsTerminated(), CPN::QueueBase::kernel, CPN::QueueBase::logger, Logger::LogLevel(), LogState(), mode, pendingBlock, pendingD4RTag, pendingFlush, pendingGrow, pendingReset, CPN::ThresholdQueue::queue, Read(), D4R::QueueBase::reader, readerlength, CPN::QueueBase::readrequest, CPN::QueueBase::readshutdown, SendD4RTagPacket(), SendDequeuePacket(), SendEndOfReadPacket(), SendEndOfWritePacket(), SendEnqueuePacket(), SendFlushPacket(), SendGrowPacket(), SendReadBlockPacket(), SendResetPacket(), SendWriteBlockPacket(), sentEnd, sock, UnlockedShutdown(), CPN::QueueBase::UnlockedShutdownReader(), CPN::QueueBase::UnlockedShutdownWriter(), WRITE, D4R::QueueBase::writer, CPN::QueueBase::writerequest, and CPN::QueueBase::writeshutdown.
Referenced by ActionThreadEntryPoint().
Here is the call graph for this function:
Here is the caller graph for this function:
|
privatevirtual |
Reimplemented from CPN::ThresholdQueue.
Definition at line 191 of file RemoteQueue.cc.
References ASSERT, FUNC_TRACE, CPN::ThresholdQueue::InternalDequeue(), CPN::QueueBase::logger, mode, READ, and Signal().
Here is the call graph for this function:
|
privatevirtual |
Reimplemented from CPN::ThresholdQueue.
Definition at line 198 of file RemoteQueue.cc.
References ASSERT, FUNC_TRACE, CPN::ThresholdQueue::InternalEnqueue(), CPN::QueueBase::logger, mode, Signal(), and WRITE.
Here is the call graph for this function:
|
privatevirtual |
Reimplemented from CPN::QueueBase.
Definition at line 205 of file RemoteQueue.cc.
References ASSERT, CPN::QueueBase::InternalFlush(), mode, pendingFlush, Signal(), and WRITE.
Here is the call graph for this function:
|
protectedvirtualinherited |
Implements CPN::QueueBase.
Definition at line 126 of file CPNThresholdQueue.cc.
References ASSERT, CPN::ThresholdQueue::dequeueUseOld, ThresholdQueueBase::GetRawDequeuePtr(), CPN::QueueBase::indequeue, CPN::ThresholdQueue::oldqueue, and CPN::ThresholdQueue::queue.
Referenced by SendEnqueuePacket().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedvirtualinherited |
Implements CPN::QueueBase.
Definition at line 57 of file CPNThresholdQueue.cc.
References ASSERT, CPN::ThresholdQueue::enqueueUseOld, ThresholdQueueBase::GetRawEnqueuePtr(), CPN::QueueBase::inenqueue, CPN::ThresholdQueue::oldqueue, and CPN::ThresholdQueue::queue.
Referenced by EnqueuePacket().
Here is the call graph for this function:
Here is the caller graph for this function:
|
privatevirtual |
Reimplemented from CPN::ThresholdQueue.
Definition at line 212 of file RemoteQueue.cc.
References ASSERT, CPN::ThresholdQueue::InternalReset(), mode, pendingReset, READ, and Signal().
Here is the call graph for this function:
|
inherited |
Definition at line 390 of file QueueBase.cc.
References CPN::QueueBase::readshutdown.
|
inherited |
Definition at line 395 of file QueueBase.cc.
References CPN::QueueBase::writeshutdown.
|
inlinevirtualinherited |
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 debug ONLY!
Implements CPN::RemoteQueueBase.
Definition at line 886 of file RemoteQueue.cc.
References actionThread, CPN::BoolString(), bytecount, ClockString(), FileHandle::Closed(), dead, Logger::Error(), fileThread, CPN::QueueBase::logger, CPN::QueueBase::LogState(), mode, pendingBlock, pendingD4RTag, pendingFlush, pendingGrow, pendingReset, READ, readerlength, sentEnd, sock, and writerlength.
Referenced by InternalCheckStatus().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inherited |
Definition at line 225 of file QueueBase.cc.
References CPN::QueueBase::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:
|
protectedinherited |
Definition at line 341 of file QueueBase.cc.
References PthreadCondition::Broadcast(), CPN::QueueBase::cond, CPN::QueueBase::readrequest, and CPN::QueueBase::UnlockedCount().
Referenced by CPN::QueueBase::Enqueue(), and EnqueuePacket().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedinherited |
Definition at line 362 of file QueueBase.cc.
References PthreadCondition::Broadcast(), CPN::QueueBase::cond, CPN::QueueBase::UnlockedFreespace(), and CPN::QueueBase::writerequest.
Referenced by CPN::QueueBase::Dequeue(), and SendEnqueuePacket().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inherited |
Used to tell any waiting threads that the network is terminating.
Definition at line 368 of file QueueBase.cc.
References PthreadCondition::Broadcast(), and CPN::QueueBase::cond.
Here is the call graph for this function:
|
inlineinherited |
Definition at line 48 of file PacketDecoder.h.
|
inherited |
Definition at line 200 of file QueueBase.cc.
References CPN::QueueBase::UnlockedNumChannels().
Here is the call graph for this function:
|
inherited |
Definition at line 321 of file QueueBase.cc.
References CPN::QueueBase::UnlockedNumDequeued().
Here is the call graph for this function:
|
inherited |
Definition at line 316 of file QueueBase.cc.
References CPN::QueueBase::UnlockedNumEnqueued().
Here is the call graph for this function:
|
staticprivate |
|
inherited |
Definition at line 230 of file QueueBase.cc.
References CPN::QueueBase::UnlockedQueueLength().
Referenced by CPN::ThresholdQueue::TQImpl::Grow(), GrowPacket(), CPN::ThresholdQueue::UnlockedGrow(), and UnlockedGrow().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inherited |
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, CPN::QueueBase::Dequeue(), and CPN::QueueBase::GetRawDequeuePtr().
Referenced by CPN::QueueBase::RawDequeue().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inherited |
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 CPN::QueueBase::RawDequeue().
Here is the call graph for this function:
|
inherited |
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 CPN::QueueBase::Enqueue(), and CPN::QueueBase::GetRawEnqueuePtr().
Referenced by CPN::QueueBase::RawEnqueue().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inherited |
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 CPN::QueueBase::RawEnqueue().
Here is the call graph for this function:
|
private |
Definition at line 540 of file RemoteQueue.cc.
References Logger::Debug(), FileHandle::Eof(), CPN::PacketDecoder::GetDecoderBytes(), CPN::QueueBase::logger, FileHandle::Readable(), SocketHandle::Recv(), CPN::PacketDecoder::ReleaseDecoderBytes(), and sock.
Referenced by InternalCheckStatus().
Here is the call graph for this function:
Here is the caller 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 CPN::QueueBase::WaitForData().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedvirtualinherited |
Implements D4R::QueueBase.
Definition at line 336 of file QueueBase.cc.
References CPN::KernelBase::CheckTerminated(), CPN::QueueBase::flushed, CPN::QueueBase::kernel, CPN::QueueBase::readrequest, CPN::QueueBase::readshutdown, CPN::QueueBase::UnlockedCount(), and CPN::QueueBase::writeshutdown.
Referenced by CPN::QueueBase::GetRawEnqueuePtr(), WaitForData(), and CPN::QueueBase::WaitForData().
Here is the call graph for this function:
Here is the caller graph for this function:
|
privatevirtual |
Implements CPN::PacketHandler.
Definition at line 354 of file RemoteQueue.cc.
References ASSERT, bytecount, ThresholdQueueBase::Count(), FUNC_TRACE, CPN::QueueBase::logger, mode, pendingD4RTag, CPN::ThresholdQueue::queue, CPN::QueueBase::readrequest, CPN::QueueBase::readshutdown, CPN::Packet::Requested(), UpdateClock(), CPN::QueueBase::useD4R, and WRITE.
Here is the call graph for this function:
|
inherited |
For unit tests.
Definition at line 380 of file QueueBase.cc.
References CPN::QueueBase::readrequest.
|
inherited |
Definition at line 44 of file PacketDecoder.cc.
References ASSERT, CPN::PacketHandler::FirePacket(), CPN::PacketDecoder::header, CPN::Packet::header, CPN::PacketDecoder::numbytes, and CPN::Packet::Valid().
Referenced by Read().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inherited |
|
inherited |
Definition at line 181 of file QueueBase.cc.
References CPN::QueueBase::InternalReset().
Here is the call graph for this function:
|
privatevirtual |
Implements CPN::PacketHandler.
Definition at line 504 of file RemoteQueue.cc.
References CPN::QueueBase::dequeuethresh, CPN::ThresholdQueue::dequeueUseOld, CPN::QueueBase::enqueuethresh, CPN::ThresholdQueue::enqueueUseOld, CPN::QueueBase::flushed, FUNC_TRACE, CPN::QueueBase::indequeue, CPN::QueueBase::inenqueue, CPN::QueueBase::logger, CPN::ThresholdQueue::oldqueue, CPN::ThresholdQueue::queue, CPN::QueueBase::readrequest, ThresholdQueueBase::Reset(), Signal(), UpdateClock(), and CPN::QueueBase::writerequest.
Here is the call graph for this function:
|
private |
Definition at line 475 of file RemoteQueue.cc.
References CPN::Packet::DataLength(), FUNC_TRACE, CPN::QueueBase::logger, mode, CPN::PACKET_D4RTAG, READ, D4R::QueueBase::reader, CPN::PacketEncoder::SendPacket(), SetupPacket(), and D4R::QueueBase::writer.
Referenced by InternalCheckStatus().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 344 of file RemoteQueue.cc.
References bytecount, ThresholdQueueBase::Count(), CPN::Packet::Count(), FUNC_TRACE, CPN::QueueBase::logger, CPN::PACKET_DEQUEUE, CPN::ThresholdQueue::queue, CPN::PacketEncoder::SendPacket(), and SetupPacket().
Referenced by InternalCheckStatus().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 425 of file RemoteQueue.cc.
References ASSERT, Logger::Debug(), FUNC_TRACE, CPN::QueueBase::logger, CPN::PACKET_ENDOFREAD, CPN::PacketEncoder::SendPacket(), sentEnd, SetupPacket(), SocketHandle::ShutdownWrite(), sock, and ErrnoException::what().
Referenced by InternalCheckStatus().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 404 of file RemoteQueue.cc.
References ASSERT, Logger::Debug(), FUNC_TRACE, CPN::QueueBase::logger, CPN::PACKET_ENDOFWRITE, CPN::PacketEncoder::SendPacket(), sentEnd, SetupPacket(), SocketHandle::ShutdownWrite(), sock, and ErrnoException::what().
Referenced by InternalCheckStatus().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineinherited |
Definition at line 44 of file PacketEncoder.h.
References ASSERT, CPN::Packet::Count(), CPN::Packet::header, CPN::PACKET_ENQUEUE, and CPN::Packet::Type().
Here is the call graph for this function:
|
private |
Definition at line 294 of file RemoteQueue.cc.
References ASSERT, bytecount, ThresholdQueueBase::Count(), CPN::Packet::Count(), FUNC_TRACE, CPN::PacketDecoder::header, CPN::Packet::header, CPN::QueueBase::indequeue, CPN::ThresholdQueue::InternalDequeue(), CPN::ThresholdQueue::InternalGetRawDequeuePtr(), CPN::QueueBase::logger, ThresholdQueueBase::MaxThreshold(), maxwritethreshold, CPN::QueueBase::NotifyFreespace(), ThresholdQueueBase::NumChannels(), CPN::PACKET_ENQUEUE, CPN::ThresholdQueue::queue, readerlength, SetupPacket(), and WriteBytes().
Referenced by InternalCheckStatus().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 496 of file RemoteQueue.cc.
References FUNC_TRACE, CPN::QueueBase::logger, CPN::PACKET_FLUSH, pendingFlush, CPN::PacketEncoder::SendPacket(), and SetupPacket().
Referenced by InternalCheckStatus().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 449 of file RemoteQueue.cc.
References FUNC_TRACE, CPN::QueueBase::logger, ThresholdQueueBase::MaxThreshold(), CPN::Packet::MaxThreshold(), CPN::PACKET_GROW, CPN::ThresholdQueue::queue, CPN::Packet::QueueSize(), readerlength, CPN::PacketEncoder::SendPacket(), SetupPacket(), and writerlength.
Referenced by InternalCheckStatus().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inherited |
Definition at line 32 of file PacketEncoder.cc.
References CPN::Packet::header, and CPN::PacketEncoder::WriteBytes().
Referenced by SendD4RTagPacket(), SendDequeuePacket(), SendEndOfReadPacket(), SendEndOfWritePacket(), SendFlushPacket(), SendGrowPacket(), SendReadBlockPacket(), SendResetPacket(), and SendWriteBlockPacket().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inherited |
Definition at line 39 of file PacketEncoder.cc.
References ASSERT, CPN::Packet::DataLength(), CPN::Packet::header, and CPN::PacketEncoder::WriteBytes().
Here is the call graph for this function:
|
private |
Definition at line 367 of file RemoteQueue.cc.
References FUNC_TRACE, CPN::QueueBase::logger, CPN::PACKET_READBLOCK, CPN::QueueBase::readrequest, CPN::Packet::Requested(), CPN::PacketEncoder::SendPacket(), and SetupPacket().
Referenced by InternalCheckStatus().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 524 of file RemoteQueue.cc.
References FUNC_TRACE, CPN::QueueBase::logger, CPN::PACKET_RESET, pendingReset, CPN::PacketEncoder::SendPacket(), and SetupPacket().
Referenced by InternalCheckStatus().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 388 of file RemoteQueue.cc.
References FUNC_TRACE, CPN::QueueBase::logger, CPN::PACKET_WRITEBLOCK, CPN::Packet::Requested(), CPN::PacketEncoder::SendPacket(), SetupPacket(), and CPN::QueueBase::writerequest.
Referenced by InternalCheckStatus().
Here is the call graph for this function:
Here is the caller 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 RemoteQueue().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 233 of file RemoteQueue.cc.
References clock, mode, READ, CPN::Packet::ReadClock(), readclock, TickClock(), and writeclock.
Referenced by SendD4RTagPacket(), SendDequeuePacket(), SendEndOfReadPacket(), SendEndOfWritePacket(), SendEnqueuePacket(), SendFlushPacket(), SendGrowPacket(), SendReadBlockPacket(), SendResetPacket(), and SendWriteBlockPacket().
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 RemoteQueue().
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
Tell the queue that CPN is shutting down and the queue should start cleaning up.
Implements CPN::RemoteQueueBase.
Definition at line 113 of file RemoteQueue.cc.
References UnlockedShutdown().
Referenced by FileThreadEntryPoint().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inherited |
Called by the QueueReader when no more data will be read.
Definition at line 250 of file QueueBase.cc.
References CPN::QueueBase::UnlockedShutdownReader().
Referenced by FileThreadEntryPoint().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inherited |
Called by the QueueWriter when no more data will be written.
Definition at line 260 of file QueueBase.cc.
References CPN::QueueBase::UnlockedShutdownWriter().
Referenced by FileThreadEntryPoint().
Here is the call graph for this function:
Here is the caller graph for this function:
|
privatevirtual |
Signal that Wait should return
Reimplemented from CPN::QueueBase.
Definition at line 657 of file RemoteQueue.cc.
References pendingAction, and CPN::QueueBase::Signal().
Referenced by D4RTagPacket(), FileThreadEntryPoint(), FlushPacket(), HandleError(), InternalDequeue(), InternalEnqueue(), InternalFlush(), InternalReset(), ResetPacket(), UnlockedGrow(), UnlockedShutdown(), WaitForData(), WaitForFreespace(), and ~RemoteQueue().
Here is the call graph for this function:
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:
|
virtual |
Start the internals of this queue.
Implements CPN::RemoteQueueBase.
Definition at line 109 of file RemoteQueue.cc.
References fileThread.
|
private |
Definition at line 815 of file RemoteQueue.cc.
References clock.
Referenced by SetupPacket().
Here is the caller graph for this function:
|
inlinevirtualinherited |
Implements D4R::QueueBase.
Definition at line 222 of file QueueBase.h.
References lock, and PthreadMutex::Unlock().
Here is the call graph for this function:
|
privatevirtual |
Reimplemented from CPN::ThresholdQueue.
Definition at line 125 of file RemoteQueue.cc.
References bytecount, ThresholdQueueBase::Count(), mode, CPN::ThresholdQueue::queue, and READ.
Referenced by GetState().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedvirtualinherited |
Implements CPN::QueueBase.
Definition at line 110 of file CPNThresholdQueue.cc.
References ThresholdQueueBase::ChannelStride(), CPN::ThresholdQueue::dequeueUseOld, CPN::ThresholdQueue::oldqueue, and CPN::ThresholdQueue::queue.
Here is the call graph for this function:
|
privatevirtual |
Reimplemented from CPN::ThresholdQueue.
Definition at line 133 of file RemoteQueue.cc.
References bytecount, ThresholdQueueBase::Empty(), mode, CPN::ThresholdQueue::queue, and READ.
Here is the call graph for this function:
|
protectedvirtualinherited |
Implements CPN::QueueBase.
Definition at line 102 of file CPNThresholdQueue.cc.
References ThresholdQueueBase::ChannelStride(), CPN::ThresholdQueue::enqueueUseOld, CPN::ThresholdQueue::oldqueue, and CPN::ThresholdQueue::queue.
Here is the call graph for this function:
|
protectedvirtualinherited |
Implements CPN::QueueBase.
Definition at line 118 of file CPNThresholdQueue.cc.
References ThresholdQueueBase::Freespace(), and CPN::ThresholdQueue::queue.
Referenced by GetState().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedvirtualinherited |
Implements CPN::QueueBase.
Definition at line 122 of file CPNThresholdQueue.cc.
References ThresholdQueueBase::Full(), and CPN::ThresholdQueue::queue.
Here is the call graph for this function:
|
privatevirtual |
Reimplemented from CPN::ThresholdQueue.
Definition at line 145 of file RemoteQueue.cc.
References actionCond, alpha, dead, FUNC_TRACE, CPN::QueueBase::lock, CPN::QueueBase::logger, ThresholdQueueBase::MaxThreshold(), mode, pendingGrow, CPN::ThresholdQueue::queue, CPN::QueueBase::QueueLength(), READ, readerlength, Signal(), CPN::ThresholdQueue::UnlockedGrow(), CPN::ThresholdQueue::UnlockedMaxThreshold(), UnlockedQueueLength(), PthreadCondition::Wait(), WRITE, and writerlength.
Here is the call graph for this function:
|
protectedvirtualinherited |
Implements CPN::QueueBase.
Definition at line 157 of file CPNThresholdQueue.cc.
References ThresholdQueueBase::MaxThreshold(), and CPN::ThresholdQueue::queue.
Referenced by GetState(), and UnlockedGrow().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedvirtualinherited |
Implements CPN::QueueBase.
Definition at line 98 of file CPNThresholdQueue.cc.
References ThresholdQueueBase::NumChannels(), and CPN::ThresholdQueue::queue.
Here is the call graph for this function:
|
protectedvirtualinherited |
Implements CPN::QueueBase.
Definition at line 169 of file CPNThresholdQueue.cc.
References ThresholdQueueBase::ElementsDequeued(), and CPN::ThresholdQueue::queue.
Referenced by GetState().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedvirtualinherited |
Implements CPN::QueueBase.
Definition at line 165 of file CPNThresholdQueue.cc.
References ThresholdQueueBase::ElementsEnqueued(), and CPN::ThresholdQueue::queue.
Referenced by GetState().
Here is the call graph for this function:
Here is the caller graph for this function:
|
privatevirtual |
Reimplemented from CPN::ThresholdQueue.
Definition at line 141 of file RemoteQueue.cc.
References readerlength, and writerlength.
Referenced by GetState(), and UnlockedGrow().
Here is the caller graph for this function:
|
private |
Definition at line 118 of file RemoteQueue.cc.
References actionCond, PthreadCondition::Broadcast(), dead, FUNC_TRACE, CPN::QueueBase::logger, and Signal().
Referenced by InternalCheckStatus(), and Shutdown().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedvirtualinherited |
Definition at line 255 of file QueueBase.cc.
References CPN::QueueBase::readshutdown, and CPN::QueueBase::Signal().
Referenced by EndOfReadPacket(), InternalCheckStatus(), and CPN::QueueBase::ShutdownReader().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedvirtualinherited |
Definition at line 311 of file QueueBase.cc.
References CPN::QueueBase::Signal(), and CPN::QueueBase::writeshutdown.
Referenced by EndOfWritePacket(), InternalCheckStatus(), and CPN::QueueBase::ShutdownWriter().
Here is the call graph for this function:
Here is the caller graph for this function:
|
privatevirtual |
Reimplemented from D4R::QueueBase.
Definition at line 219 of file RemoteQueue.cc.
References ASSERT, FUNC_TRACE, CPN::QueueBase::logger, mode, pendingD4RTag, READ, and D4R::QueueBase::UnlockedSignalReaderTagChanged().
Here is the call graph for this function:
|
privatevirtual |
Reimplemented from D4R::QueueBase.
Definition at line 226 of file RemoteQueue.cc.
References ASSERT, FUNC_TRACE, CPN::QueueBase::logger, mode, pendingD4RTag, D4R::QueueBase::UnlockedSignalWriterTagChanged(), and WRITE.
Here is the call graph for this function:
|
private |
Definition at line 805 of file RemoteQueue.cc.
References clock, mode, READ, CPN::Packet::ReadClock(), readclock, CPN::Packet::WriteClock(), and writeclock.
Referenced by D4RTagPacket(), DequeuePacket(), EndOfReadPacket(), EndOfWritePacket(), EnqueuePacket(), FlushPacket(), GrowPacket(), ReadBlockPacket(), ResetPacket(), and WriteBlockPacket().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprotectedvirtualinherited |
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 ActionThreadEntryPoint(), CPN::QueueBase::GetRawEnqueuePtr(), WaitForData(), and WaitForFreespace().
Here is the caller graph for this function:
|
privatevirtual |
Reimplemented from CPN::QueueBase.
Definition at line 161 of file RemoteQueue.cc.
References ASSERT, clock, FUNC_TRACE, CPN::QueueBase::logger, mode, pendingBlock, READ, CPN::QueueBase::ReadBlocked(), readclock, Signal(), tagUpdated, CPN::QueueBase::Wait(), and CPN::QueueBase::WaitForData().
Here is the call graph for this function:
|
privatevirtual |
Reimplemented from CPN::QueueBase.
Definition at line 176 of file RemoteQueue.cc.
References ASSERT, clock, FUNC_TRACE, CPN::QueueBase::logger, mode, pendingBlock, Signal(), tagUpdated, CPN::QueueBase::Wait(), CPN::QueueBase::WaitForFreespace(), WRITE, CPN::QueueBase::WriteBlocked(), and writeclock.
Here is the call 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 CPN::QueueBase::GetRawEnqueuePtr(), and CPN::QueueBase::WaitForFreespace().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedvirtualinherited |
Implements D4R::QueueBase.
Definition at line 357 of file QueueBase.cc.
References CPN::KernelBase::CheckTerminated(), CPN::QueueBase::flushed, CPN::QueueBase::kernel, CPN::QueueBase::readshutdown, CPN::QueueBase::UnlockedFreespace(), CPN::QueueBase::writerequest, and CPN::QueueBase::writeshutdown.
Referenced by CPN::QueueBase::GetRawDequeuePtr(), WaitForFreespace(), and CPN::QueueBase::WaitForFreespace().
Here is the call graph for this function:
Here is the caller graph for this function:
|
privatevirtual |
Implements CPN::PacketHandler.
Definition at line 375 of file RemoteQueue.cc.
References ASSERT, ThresholdQueueBase::Count(), FUNC_TRACE, CPN::QueueBase::logger, mode, pendingD4RTag, CPN::ThresholdQueue::queue, READ, readerlength, CPN::Packet::Requested(), UpdateClock(), CPN::QueueBase::useD4R, CPN::QueueBase::writerequest, and CPN::QueueBase::writeshutdown.
Here is the call graph for this function:
|
privatevirtual |
Implements CPN::PacketEncoder.
Definition at line 556 of file RemoteQueue.cc.
References ASSERT, sock, FileHandle::Write(), and FileHandle::Writev().
Referenced by SendEnqueuePacket().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inherited |
For unit tests.
Definition at line 385 of file QueueBase.cc.
References CPN::QueueBase::writerequest.
|
private |
Definition at line 146 of file RemoteQueue.h.
Referenced by ActionThreadEntryPoint(), FileThreadEntryPoint(), HandleError(), InternalCheckStatus(), UnlockedGrow(), UnlockedShutdown(), and ~RemoteQueue().
|
private |
Definition at line 143 of file RemoteQueue.h.
Referenced by FileThreadEntryPoint(), LogState(), RemoteQueue(), and ~RemoteQueue().
|
private |
Definition at line 145 of file RemoteQueue.h.
Referenced by ActionThreadEntryPoint(), and FileThreadEntryPoint().
|
private |
Definition at line 149 of file RemoteQueue.h.
Referenced by GrowPacket(), and UnlockedGrow().
|
private |
When in write mode this is the number of bytes that we think are in the queue on the other side. When in read mode this is the number of bytes that we have read from the socket minus the number of bytes that have been dequeued.
Definition at line 168 of file RemoteQueue.h.
Referenced by DequeuePacket(), EnqueuePacket(), GetState(), InternalCheckStatus(), LogState(), ReadBlockPacket(), SendDequeuePacket(), SendEnqueuePacket(), UnlockedCount(), and UnlockedEmpty().
|
private |
Definition at line 155 of file RemoteQueue.h.
Referenced by ClockString(), EnqueuePacket(), SetupPacket(), TickClock(), UpdateClock(), WaitForData(), and WaitForFreespace().
|
protectedinherited |
Definition at line 290 of file QueueBase.h.
Referenced by CPN::QueueBase::InternalFlush(), CPN::QueueBase::InternalReset(), CPN::QueueBase::NotifyData(), CPN::QueueBase::NotifyFreespace(), CPN::QueueBase::NotifyTerminate(), CPN::QueueBase::WaitForData(), and CPN::QueueBase::WaitForFreespace().
|
protectedinherited |
Definition at line 291 of file QueueBase.h.
|
private |
Definition at line 178 of file RemoteQueue.h.
Referenced by ActionThreadEntryPoint(), FileThreadEntryPoint(), GetState(), HandleError(), InternalCheckStatus(), LogState(), UnlockedGrow(), UnlockedShutdown(), and ~RemoteQueue().
|
protectedinherited |
Definition at line 282 of file QueueBase.h.
Referenced by CPN::QueueBase::Dequeue(), CPN::QueueBase::GetRawDequeuePtr(), CPN::QueueBase::InternalReset(), CPN::QueueBase::LogState(), and ResetPacket().
|
protectedinherited |
Definition at line 90 of file CPNThresholdQueue.h.
Referenced by CPN::ThresholdQueue::InternalDequeue(), CPN::ThresholdQueue::InternalGetRawDequeuePtr(), CPN::ThresholdQueue::InternalReset(), ResetPacket(), CPN::ThresholdQueue::UnlockedDequeueChannelStride(), and CPN::ThresholdQueue::UnlockedGrow().
|
protectedinherited |
Definition at line 281 of file QueueBase.h.
Referenced by CPN::QueueBase::Enqueue(), CPN::QueueBase::GetRawEnqueuePtr(), CPN::QueueBase::InternalReset(), CPN::QueueBase::LogState(), and ResetPacket().
|
protectedinherited |
Definition at line 89 of file CPNThresholdQueue.h.
Referenced by CPN::ThresholdQueue::InternalEnqueue(), CPN::ThresholdQueue::InternalGetRawEnqueuePtr(), CPN::ThresholdQueue::InternalReset(), ResetPacket(), CPN::ThresholdQueue::UnlockedEnqueueChannelStride(), and CPN::ThresholdQueue::UnlockedGrow().
|
private |
Definition at line 142 of file RemoteQueue.h.
Referenced by LogState(), RemoteQueue(), Start(), and ~RemoteQueue().
|
protectedinherited |
Definition at line 285 of file QueueBase.h.
Referenced by CPN::QueueBase::Flushed(), FlushPacket(), CPN::QueueBase::GetRawDequeuePtr(), CPN::QueueBase::GetRawEnqueuePtr(), CPN::QueueBase::InternalFlush(), CPN::QueueBase::InternalReset(), CPN::QueueBase::LogState(), CPN::QueueBase::ReadBlocked(), ResetPacket(), and CPN::QueueBase::WriteBlocked().
|
private |
Definition at line 152 of file RemoteQueue.h.
Referenced by FileThreadEntryPoint().
|
protectedinherited |
Definition at line 126 of file D4RQueue.h.
Referenced by D4R::QueueBase::ReadBlock(), and D4R::QueueBase::WriteBlock().
|
protectedinherited |
Definition at line 283 of file QueueBase.h.
Referenced by CPN::QueueBase::Dequeue(), CPN::QueueBase::GetRawDequeuePtr(), CPN::ThresholdQueue::InternalGetRawDequeuePtr(), CPN::QueueBase::InternalReset(), CPN::QueueBase::LogState(), ResetPacket(), SendEnqueuePacket(), and CPN::ThresholdQueue::UnlockedGrow().
|
protectedinherited |
Definition at line 284 of file QueueBase.h.
Referenced by CPN::QueueBase::Enqueue(), EnqueuePacket(), CPN::QueueBase::GetRawEnqueuePtr(), CPN::ThresholdQueue::InternalGetRawEnqueuePtr(), CPN::QueueBase::InternalReset(), CPN::QueueBase::LogState(), ResetPacket(), and CPN::ThresholdQueue::UnlockedGrow().
|
protectedinherited |
Definition at line 286 of file QueueBase.h.
Referenced by CPN::QueueBase::Detect(), FileThreadEntryPoint(), CPN::QueueBase::GetRawDequeuePtr(), CPN::QueueBase::GetRawEnqueuePtr(), InternalCheckStatus(), CPN::QueueBase::ReadBlocked(), and CPN::QueueBase::WriteBlocked().
|
mutableprotectedinherited |
Definition at line 289 of file QueueBase.h.
Referenced by FileThreadEntryPoint(), UnlockedGrow(), CPN::QueueBase::WaitForData(), and CPN::QueueBase::WaitForFreespace().
|
protectedinherited |
Definition at line 288 of file QueueBase.h.
Referenced by D4RTagPacket(), DequeuePacket(), CPN::QueueBase::Detect(), EndOfReadPacket(), EndOfWritePacket(), EnqueuePacket(), FileThreadEntryPoint(), FlushPacket(), GrowPacket(), HandleError(), InternalCheckStatus(), InternalDequeue(), InternalEnqueue(), LogState(), CPN::QueueBase::LogState(), CPN::QueueBase::QueueBase(), Read(), ReadBlockPacket(), RemoteQueue(), ResetPacket(), SendD4RTagPacket(), SendDequeuePacket(), SendEndOfReadPacket(), SendEndOfWritePacket(), SendEnqueuePacket(), SendFlushPacket(), SendGrowPacket(), SendReadBlockPacket(), SendResetPacket(), SendWriteBlockPacket(), UnlockedGrow(), UnlockedShutdown(), UnlockedSignalReaderTagChanged(), UnlockedSignalWriterTagChanged(), WaitForData(), WaitForFreespace(), WriteBlockPacket(), and ~RemoteQueue().
|
private |
Definition at line 150 of file RemoteQueue.h.
Referenced by SendEnqueuePacket().
|
private |
Definition at line 154 of file RemoteQueue.h.
Referenced by D4RTagPacket(), and RemoteQueue().
|
private |
Definition at line 148 of file RemoteQueue.h.
Referenced by D4RTagPacket(), DequeuePacket(), EndOfReadPacket(), EndOfWritePacket(), EnqueuePacket(), FileThreadEntryPoint(), GetKey(), GetMode(), GetState(), GrowPacket(), InternalCheckStatus(), InternalDequeue(), InternalEnqueue(), InternalFlush(), InternalReset(), LogState(), ReadBlockPacket(), RemoteQueue(), SendD4RTagPacket(), SetupPacket(), UnlockedCount(), UnlockedEmpty(), UnlockedGrow(), UnlockedSignalReaderTagChanged(), UnlockedSignalWriterTagChanged(), UpdateClock(), WaitForData(), WaitForFreespace(), and WriteBlockPacket().
|
protectedinherited |
Definition at line 88 of file CPNThresholdQueue.h.
Referenced by CPN::ThresholdQueue::InternalDequeue(), CPN::ThresholdQueue::InternalEnqueue(), CPN::ThresholdQueue::InternalGetRawDequeuePtr(), CPN::ThresholdQueue::InternalGetRawEnqueuePtr(), CPN::ThresholdQueue::InternalReset(), ResetPacket(), CPN::ThresholdQueue::UnlockedDequeueChannelStride(), CPN::ThresholdQueue::UnlockedEnqueueChannelStride(), CPN::ThresholdQueue::UnlockedGrow(), and CPN::ThresholdQueue::~ThresholdQueue().
|
private |
Definition at line 144 of file RemoteQueue.h.
Referenced by ActionThreadEntryPoint(), and Signal().
|
private |
Definition at line 170 of file RemoteQueue.h.
Referenced by GetState(), InternalCheckStatus(), LogState(), WaitForData(), and WaitForFreespace().
|
private |
Definition at line 173 of file RemoteQueue.h.
Referenced by GetState(), InternalCheckStatus(), LogState(), ReadBlockPacket(), UnlockedSignalReaderTagChanged(), UnlockedSignalWriterTagChanged(), and WriteBlockPacket().
|
private |
Definition at line 175 of file RemoteQueue.h.
Referenced by InternalCheckStatus(), InternalFlush(), LogState(), and SendFlushPacket().
|
private |
Definition at line 172 of file RemoteQueue.h.
Referenced by GetState(), InternalCheckStatus(), LogState(), and UnlockedGrow().
|
private |
Definition at line 176 of file RemoteQueue.h.
Referenced by InternalCheckStatus(), InternalReset(), LogState(), and SendResetPacket().
|
protectedinherited |
Definition at line 278 of file QueueBase.h.
Referenced by CPN::QueueBase::InternalFlush().
|
protectedinherited |
Definition at line 277 of file QueueBase.h.
Referenced by CPN::QueueBase::InternalReset().
|
protectedinherited |
Definition at line 87 of file CPNThresholdQueue.h.
Referenced by EnqueuePacket(), GrowPacket(), InternalCheckStatus(), CPN::ThresholdQueue::InternalDequeue(), CPN::ThresholdQueue::InternalEnqueue(), CPN::ThresholdQueue::InternalGetRawDequeuePtr(), CPN::ThresholdQueue::InternalGetRawEnqueuePtr(), CPN::ThresholdQueue::InternalReset(), ReadBlockPacket(), ResetPacket(), SendDequeuePacket(), SendEnqueuePacket(), SendGrowPacket(), CPN::ThresholdQueue::ThresholdQueue(), CPN::ThresholdQueue::UnlockedCount(), UnlockedCount(), CPN::ThresholdQueue::UnlockedDequeueChannelStride(), CPN::ThresholdQueue::UnlockedEmpty(), UnlockedEmpty(), CPN::ThresholdQueue::UnlockedEnqueueChannelStride(), CPN::ThresholdQueue::UnlockedFreespace(), CPN::ThresholdQueue::UnlockedFull(), CPN::ThresholdQueue::UnlockedGrow(), UnlockedGrow(), CPN::ThresholdQueue::UnlockedMaxThreshold(), CPN::ThresholdQueue::UnlockedNumChannels(), CPN::ThresholdQueue::UnlockedNumDequeued(), CPN::ThresholdQueue::UnlockedNumEnqueued(), CPN::ThresholdQueue::UnlockedQueueLength(), WriteBlockPacket(), and CPN::ThresholdQueue::~ThresholdQueue().
|
private |
Definition at line 156 of file RemoteQueue.h.
Referenced by ClockString(), EnqueuePacket(), SetupPacket(), UpdateClock(), and WaitForData().
|
protectedinherited |
Definition at line 122 of file D4RQueue.h.
Referenced by InternalCheckStatus(), D4R::QueueBase::ReadBlock(), SendD4RTagPacket(), D4R::QueueBase::SetReaderNode(), D4R::QueueBase::UnlockedSignalReaderTagChanged(), D4R::QueueBase::UnlockedSignalWriterTagChanged(), and D4R::QueueBase::WriteBlock().
|
protectedinherited |
Definition at line 273 of file QueueBase.h.
Referenced by CPN::QueueBase::Dequeue(), GetKey(), CPN::QueueBase::GetRawDequeuePtr(), CPN::QueueBase::LogState(), CPN::QueueBase::QueueBase(), and RemoteQueue().
|
private |
Definition at line 159 of file RemoteQueue.h.
Referenced by GetState(), GrowPacket(), InternalCheckStatus(), LogState(), SendEnqueuePacket(), SendGrowPacket(), UnlockedGrow(), UnlockedQueueLength(), and WriteBlockPacket().
|
protectedinherited |
Definition at line 279 of file QueueBase.h.
Referenced by DequeuePacket(), CPN::QueueBase::GetRawDequeuePtr(), CPN::QueueBase::GetRawEnqueuePtr(), GetState(), InternalCheckStatus(), CPN::QueueBase::InternalReset(), CPN::QueueBase::LogState(), CPN::QueueBase::NotifyData(), CPN::QueueBase::ReadBlocked(), ReadBlockPacket(), CPN::QueueBase::ReadRequest(), ResetPacket(), and SendReadBlockPacket().
|
protectedinherited |
Definition at line 275 of file QueueBase.h.
Referenced by CPN::QueueBase::Dequeue(), DequeuePacket(), EndOfReadPacket(), CPN::QueueBase::GetRawDequeuePtr(), CPN::QueueBase::GetRawEnqueuePtr(), GetState(), HandleError(), InternalCheckStatus(), CPN::QueueBase::InternalFlush(), CPN::QueueBase::IsReaderShutdown(), CPN::QueueBase::LogState(), CPN::QueueBase::ReadBlocked(), ReadBlockPacket(), CPN::QueueBase::UnlockedShutdownReader(), and CPN::QueueBase::WriteBlocked().
|
protectedinherited |
Definition at line 124 of file D4RQueue.h.
Referenced by D4R::QueueBase::UnlockedSignalReaderTagChanged(), and D4R::QueueBase::WriteBlock().
|
private |
Definition at line 171 of file RemoteQueue.h.
Referenced by GetState(), InternalCheckStatus(), LogState(), SendEndOfReadPacket(), and SendEndOfWritePacket().
|
private |
Definition at line 151 of file RemoteQueue.h.
Referenced by FileThreadEntryPoint().
|
private |
Definition at line 153 of file RemoteQueue.h.
Referenced by D4RTagPacket(), EnqueuePacket(), FileThreadEntryPoint(), HandleError(), InternalCheckStatus(), LogState(), Read(), SendEndOfReadPacket(), SendEndOfWritePacket(), and WriteBytes().
|
private |
Definition at line 174 of file RemoteQueue.h.
Referenced by D4RTagPacket(), WaitForData(), and WaitForFreespace().
|
protectedinherited |
Definition at line 287 of file QueueBase.h.
Referenced by CPN::QueueBase::GetRawEnqueuePtr(), ReadBlockPacket(), CPN::QueueBase::WaitForData(), CPN::QueueBase::WaitForFreespace(), and WriteBlockPacket().
|
private |
Definition at line 157 of file RemoteQueue.h.
Referenced by ClockString(), EnqueuePacket(), SetupPacket(), UpdateClock(), and WaitForFreespace().
|
protectedinherited |
Definition at line 123 of file D4RQueue.h.
Referenced by InternalCheckStatus(), D4R::QueueBase::ReadBlock(), SendD4RTagPacket(), D4R::QueueBase::SetWriterNode(), D4R::QueueBase::UnlockedSignalReaderTagChanged(), D4R::QueueBase::UnlockedSignalWriterTagChanged(), and D4R::QueueBase::WriteBlock().
|
protectedinherited |
Definition at line 280 of file QueueBase.h.
Referenced by CPN::QueueBase::Detect(), EnqueuePacket(), CPN::QueueBase::GetRawDequeuePtr(), CPN::QueueBase::GetRawEnqueuePtr(), GetState(), InternalCheckStatus(), CPN::QueueBase::InternalFlush(), CPN::QueueBase::InternalReset(), CPN::QueueBase::LogState(), CPN::QueueBase::NotifyFreespace(), ResetPacket(), SendWriteBlockPacket(), CPN::QueueBase::WriteBlocked(), WriteBlockPacket(), and CPN::QueueBase::WriteRequest().
|
protectedinherited |
Definition at line 274 of file QueueBase.h.
Referenced by CPN::QueueBase::Enqueue(), GetKey(), CPN::QueueBase::GetRawEnqueuePtr(), CPN::QueueBase::InternalFlush(), CPN::QueueBase::LogState(), CPN::QueueBase::QueueBase(), and RemoteQueue().
|
private |
Definition at line 160 of file RemoteQueue.h.
Referenced by GetState(), GrowPacket(), LogState(), SendGrowPacket(), UnlockedGrow(), and UnlockedQueueLength().
|
protectedinherited |
Definition at line 276 of file QueueBase.h.
Referenced by EndOfWritePacket(), CPN::QueueBase::Enqueue(), EnqueuePacket(), CPN::QueueBase::GetRawDequeuePtr(), CPN::QueueBase::GetRawEnqueuePtr(), GetState(), HandleError(), InternalCheckStatus(), CPN::QueueBase::InternalFlush(), CPN::QueueBase::IsWriterShutdown(), CPN::QueueBase::LogState(), CPN::QueueBase::ReadBlocked(), CPN::QueueBase::UnlockedShutdownWriter(), CPN::QueueBase::WriteBlocked(), and WriteBlockPacket().
|
protectedinherited |
Definition at line 125 of file D4RQueue.h.
Referenced by D4R::QueueBase::ReadBlock(), and D4R::QueueBase::UnlockedSignalWriterTagChanged().
1.8.5