#include <pipequeue.h>


Garbage collection gc() must be called once in a while, for example after each push().
Pushing does not block consumer from reading.
Definition at line 90 of file pipequeue.h.
Public Member Functions | |
| PipeQueue (const std::string &name) | |
| virtual | ~PipeQueue () |
| PipeQueueConsumer< T > * | createConsumer (const std::string &name, Stack w) |
| Creates a new consumer. | |
| size_t | push (T *ob, Stack w) |
| ob is now property of this queue | |
| size_t | size () |
| Return the size of queue. | |
| void | gc (Stack w) |
| void | deleteConsumer (PipeQueueConsumer< T > *c, Stack w) |
| c is deleted and no longer valid | |
| void | setSignalSemaphore (PipeQueueConsumer< T > *c, PosixConstructs::PosixSemaphore *semaphore) |
| bool | hasSignalSemaphore (PipeQueueConsumer< T > *c) |
| ... | |
| void | setInterests (PipeQueueConsumer< T > *c, MyInterests< T > *interests) |
| Set filter on objects. The caller continues to own the pointer. | |
| virtual void | push_callback (PipeQueueConsumer< T > *) |
Data Structures | |
| struct | Subscription |
| PosixQueues::PipeQueue< T >::PipeQueue | ( | const std::string & | name | ) | [inline] |
Definition at line 92 of file pipequeue.h.
| virtual PosixQueues::PipeQueue< T >::~PipeQueue | ( | ) | [inline, virtual] |
Definition at line 93 of file pipequeue.h.
| PipeQueueConsumer< T > * PosixQueues::PipeQueue< T >::createConsumer | ( | const std::string & | name, | |
| Stack | w | |||
| ) | [inline] |
Creates a new consumer.
Definition at line 377 of file pipequeue.h.
Referenced by main(), RDK2::RepositoryNS::Session::queueGetSubscription(), and RDK2::RepositoryNS::Session::storageSubscribeDiffs().
| size_t PosixQueues::PipeQueue< T >::push | ( | T * | ob, | |
| Stack | w | |||
| ) | [inline] |
ob is now property of this queue
Definition at line 408 of file pipequeue.h.
Referenced by main(), RDK2::RepositoryNS::Repository::pushDiffInDiffQueue(), RDK2::RepositoryNS::Session::queuePush(), and RDK2::RepositoryNS::Repository::queuePush().
| size_t PosixQueues::PipeQueue< T >::size | ( | ) | [inline] |
Return the size of queue.
Definition at line 471 of file pipequeue.h.
Referenced by RDK2::RepositoryNS::Session::queueSize().
| void PosixQueues::PipeQueue< T >::gc | ( | Stack | w | ) | [inline] |
Runs garbage collection; to be called once in a while, for example after push
Definition at line 479 of file pipequeue.h.
Referenced by RDK2::RepositoryNS::Repository::pushDiffInDiffQueue(), RDK2::RepositoryNS::Session::queuePush(), and RDK2::RepositoryNS::Repository::queuePush().
| void PosixQueues::PipeQueue< T >::deleteConsumer | ( | PipeQueueConsumer< T > * | c, | |
| Stack | w | |||
| ) | [inline] |
c is deleted and no longer valid
Definition at line 360 of file pipequeue.h.
Referenced by RDK2::RepositoryNS::Session::queueUnsubscribe(), and RDK2::RepositoryNS::Session::storageUnsubscribeDiffs().
| void PosixQueues::PipeQueue< T >::setSignalSemaphore | ( | PipeQueueConsumer< T > * | c, | |
| PosixConstructs::PosixSemaphore * | semaphore | |||
| ) | [inline] |
This is needed to make a thread capable of waiting on multiple queues. The caller continues to own the pointer. If semaphore = 0 (default), no signal happens.
Definition at line 319 of file pipequeue.h.
Referenced by RDK2::RepositoryNS::Session::listenToQueue(), RDK2::RepositoryNS::Session::queueGetSubscription(), RDK2::RepositoryNS::Session::storageSubscribeDiffs(), and RDK2::RepositoryNS::Session::unlistenToQueue().
| bool PosixQueues::PipeQueue< T >::hasSignalSemaphore | ( | PipeQueueConsumer< T > * | c | ) | [inline] |
| void PosixQueues::PipeQueue< T >::setInterests | ( | PipeQueueConsumer< T > * | c, | |
| MyInterests< T > * | interests | |||
| ) | [inline] |
Set filter on objects. The caller continues to own the pointer.
Definition at line 348 of file pipequeue.h.
Referenced by RDK2::RepositoryNS::Session::queueSetInterests().
| virtual void PosixQueues::PipeQueue< T >::push_callback | ( | PipeQueueConsumer< T > * | ) | [inline, virtual] |
Definition at line 122 of file pipequeue.h.
1.5.6