#include <agentx_queue.h>
|
| | AgentXQueue () |
| | Construct an empty queue.
|
| |
| virtual | ~AgentXQueue () |
| | Destructor.
|
| |
| virtual u_int | add (AgentXPdu *) |
| | Add a request to the queue and set its packet id to a unique identifier.
|
| |
| virtual time_t | timeout (time_t) |
| | Timeout old requests and return the time until next request will timeout.
|
| |
| virtual AgentXPdu * | get_late (time_t) |
| | Get the first requests that is timed out in respect of the given time value.
|
| |
| virtual bool | remove (AgentXPdu *) |
| | Remove a request from the queue.
|
| |
| virtual void | cancel (u_int) |
| | Cancel (remove from queue) all requests with a given transaction id.
|
| |
| virtual bool | pending (u_int) |
| | Check whether there are any pending requests for a given transaction id.
|
| |
| virtual AgentXPdu * | find (u_int, unsigned long, bool pending=FALSE) |
| | Get the request for a given session id and request id.
|
| |
| virtual AgentXPdu * | find (u_int) |
| | Get the request for the given packet id.
|
| |
| OrderedListCursor< AgentXPdu > | elements () |
| | Return a ordered list cursor over the elements of the queue (NOT SYNCHRONIZED)
|
| |
| AgentXQueue::AgentXQueue |
( |
| ) |
|
Construct an empty queue.
| virtual AgentXQueue::~AgentXQueue |
( |
| ) |
|
|
virtual |
| virtual u_int AgentXQueue::add |
( |
AgentXPdu * |
| ) |
|
|
virtual |
Add a request to the queue and set its packet id to a unique identifier.
(SYNCHRONIZED)
- Parameters
-
- Returns
- the (new) unique packet id of request.
| virtual void AgentXQueue::cancel |
( |
u_int |
| ) |
|
|
virtual |
Cancel (remove from queue) all requests with a given transaction id.
(SYNCHRONIZED)
- Parameters
-
| transactionID | a transaction ID. |
| static u_int AgentXQueue::create_packet_id |
( |
| ) |
|
|
static |
Create a new packet id.
- Returns
- a packet id.
| OrderedListCursor<AgentXPdu> AgentXQueue::elements |
( |
| ) |
|
Return a ordered list cursor over the elements of the queue (NOT SYNCHRONIZED)
- Returns
- an OrderedListCursor instance.
| virtual AgentXPdu* AgentXQueue::find |
( |
u_int |
, |
|
|
unsigned |
long, |
|
|
bool |
pending = FALSE |
|
) |
| |
|
virtual |
Get the request for a given session id and request id.
(NOT SYNCHRONIZED)
- Parameters
-
| session | a AgentX session |
| transactionID | the transaction id of a request |
| pending | if TRUE, only pending (not yet sent) requests are returned, otherwise any request that match the given session and transaction ID will be returned. |
- Returns
- a pointer to an AgentXPdu if such a request could be found or 0 otherwise.
| virtual AgentXPdu* AgentXQueue::find |
( |
u_int |
| ) |
|
|
virtual |
Get the request for the given packet id.
(NOT SYNCHRONIZED)
- Parameters
-
| packetID | the packet id of a request |
- Returns
- a pointer an request if such a request could be found or 0 otherwise.
| virtual AgentXPdu* AgentXQueue::get_late |
( |
time_t |
| ) |
|
|
virtual |
Get the first requests that is timed out in respect of the given time value.
- Parameters
-
| timeout | a time value. The first request with a timestamp value less than timeout will be returned. |
- Returns
- a pointer to an AgentXPdu.
| virtual bool AgentXQueue::pending |
( |
u_int |
| ) |
|
|
virtual |
Check whether there are any pending requests for a given transaction id.
- Parameters
-
| transactionID | a transaction ID. |
- Returns
- TRUE if there is any request for the specified transaction id within the queue, FALSE otherwise.
| virtual bool AgentXQueue::remove |
( |
AgentXPdu * |
| ) |
|
|
virtual |
Remove a request from the queue.
(NOT SYNCHRONIZED)
- Parameters
-
| request | a pointer to the request to be removed. The memory allocated by request will be freed, if the request could be removed successfully. |
- Returns
- TRUE if the request could be removed successfully.
| virtual time_t AgentXQueue::timeout |
( |
time_t |
| ) |
|
|
virtual |
Timeout old requests and return the time until next request will timeout.
(SYNCHRONIZED)
- Parameters
-
| timeout | a time value. All requests with a timeout value less than timeout will be deleted from the queue. |
- Returns
- the time until the next request will timeout.
The documentation for this class was generated from the following file: