#include <commandQueue.h>
Definition at line 24 of file net/commandQueue.h.
Public Member Functions | |
| virtual void | push (Command &packet) |
| Push a command to the queue. | |
| virtual void | pushFront (Command &packet) |
| Push a command to the front of the queue. | |
| virtual void | wakeup () |
| Wake up the command queue, pop() will return 0. | |
| virtual Command * | pop () |
| Pop a command from the queue. | |
| virtual Command * | tryPop () |
| Try to pop a command from the queue. | |
| void | release (Command *command) |
| Release a command obtained by pop() or tryPop(). | |
| Command * | back () const |
| Peek the command at the end of the queue. | |
| bool | empty () const |
| virtual void | flush () |
| Flush all cached commands. | |
| size_t | size () const |
| CHECK_THREAD_DECLARE (_thread) | |
| void eq::net::CommandQueue::push | ( | Command & | packet | ) | [virtual] |
Push a command to the queue.
| packet | the command packet. |
Reimplemented in eq::CommandQueue.
Definition at line 45 of file net/commandQueue.cpp.
References eq::net::Command::_dispatched, eq::net::CommandCache::alloc(), eq::net::Command::isValid(), eq::base::Lock::set(), and eq::base::Lock::unset().
Referenced by eq::CommandQueue::push().
| void eq::net::CommandQueue::pushFront | ( | Command & | packet | ) | [virtual] |
Push a command to the front of the queue.
Reimplemented in eq::CommandQueue.
Definition at line 58 of file net/commandQueue.cpp.
References eq::net::Command::_dispatched, eq::net::CommandCache::alloc(), eq::net::Command::isValid(), eq::base::Lock::set(), and eq::base::Lock::unset().
Referenced by eq::CommandQueue::pushFront().
| virtual void eq::net::CommandQueue::wakeup | ( | ) | [inline, virtual] |
Wake up the command queue, pop() will return 0.
Reimplemented in eq::CommandQueue.
Definition at line 41 of file net/commandQueue.h.
Referenced by eq::CommandQueue::wakeup().
| Command * eq::net::CommandQueue::pop | ( | ) | [virtual] |
Pop a command from the queue.
The returned packet has to be released after usage.
Reimplemented in eq::CommandQueue.
Definition at line 71 of file net/commandQueue.cpp.
Referenced by eq::CommandQueue::pop().
| Command * eq::net::CommandQueue::tryPop | ( | ) | [virtual] |
Try to pop a command from the queue.
The returned packet has to be released after usage.
Reimplemented in eq::CommandQueue.
Definition at line 78 of file net/commandQueue.cpp.
Referenced by eq::CommandQueue::tryPop().
| void eq::net::CommandQueue::release | ( | Command * | command | ) |
Release a command obtained by pop() or tryPop().
Definition at line 84 of file net/commandQueue.cpp.
References eq::net::CommandCache::release(), eq::base::Lock::set(), and eq::base::Lock::unset().
Referenced by eq::Config::exit(), eq::Config::nextEvent(), eq::Client::processCommand(), and eq::Config::tryNextEvent().
| Command * eq::net::CommandQueue::back | ( | ) | const |
Peek the command at the end of the queue.
Definition at line 94 of file net/commandQueue.cpp.
| bool eq::net::CommandQueue::empty | ( | ) | const [inline] |
true if the command queue is empty, false if not. Definition at line 75 of file net/commandQueue.h.
Referenced by flush(), eq::CommandQueue::pop(), and eq::Node::~Node().
| void eq::net::CommandQueue::flush | ( | ) | [virtual] |
Flush all cached commands.
Reimplemented in eq::CommandQueue.
Definition at line 26 of file net/commandQueue.cpp.
References empty(), eq::net::CommandCache::flush(), eq::net::CommandCache::release(), eq::base::Lock::set(), and eq::base::Lock::unset().
Referenced by eq::CommandQueue::flush().
| size_t eq::net::CommandQueue::size | ( | ) | const [inline] |
0.6 by
1.5.5