![]() |
Kea 3.1.1
|
Wrapper around a chronological list of queries, uniquely keyed by transaction id. More...
#include <lease_query_connection.h>
Public Types | |
typedef boost::shared_ptr< QueryType > | QueryPtrType |
Type of pointers to QueryType. | |
typedef boost::multi_index_container< QueryPtrType, boost::multi_index::indexed_by< boost::multi_index::sequenced<>, boost::multi_index::ordered_unique< boost::multi_index::const_mem_fun< QueryType, Xid, &QueryType::getXid > > > > | XidQueueContainer |
Multi-index container for storing bulk lease queries. | |
Public Member Functions | |
void | add (QueryPtrType query) |
Adds a query to the end of the queue. | |
void | clear () |
Removes all queries from the queue. | |
bool | empty () const |
Empty predicate. | |
QueryPtrType | find (const Xid &xid) const |
Fetches the query for a given transaction id. | |
QueryPtrType | pop () |
Pops a query to the beginning of the queue. | |
void | remove (const Xid &xid) |
Removes a query from the queue for a given transaction id. | |
size_t | size () const |
Fetches the number of entries in the queue. | |
Wrapper around a chronological list of queries, uniquely keyed by transaction id.
New entries are added to the end. The wrapper uses it's own mutex to ensure thread-safety.
QueryType | Either BlqQuery or BulkLeaseQuery type. |
Definition at line 37 of file lease_query_connection.h.
typedef boost::shared_ptr<QueryType> isc::lease_query::XidQueue< QueryType >::QueryPtrType |
Type of pointers to QueryType.
Definition at line 40 of file lease_query_connection.h.
typedef boost::multi_index_container< QueryPtrType, boost::multi_index::indexed_by< boost::multi_index::sequenced<>, boost::multi_index::ordered_unique< boost::multi_index::const_mem_fun<QueryType, Xid, &QueryType::getXid> > > > isc::lease_query::XidQueue< QueryType >::XidQueueContainer |
Multi-index container for storing bulk lease queries.
Definition at line 54 of file lease_query_connection.h.
|
inline |
Adds a query to the end of the queue.
query | Pointer to the query to add. |
Definition at line 59 of file lease_query_connection.h.
|
inline |
Removes all queries from the queue.
Definition at line 117 of file lease_query_connection.h.
|
inline |
Empty predicate.
Definition at line 82 of file lease_query_connection.h.
|
inline |
Fetches the query for a given transaction id.
xid | Transaction id for which to search. |
Definition at line 100 of file lease_query_connection.h.
|
inline |
Pops a query to the beginning of the queue.
Definition at line 67 of file lease_query_connection.h.
|
inline |
Removes a query from the queue for a given transaction id.
xid | Transaction id for which to search. |
Definition at line 108 of file lease_query_connection.h.
References get().
|
inline |
Fetches the number of entries in the queue.
Definition at line 90 of file lease_query_connection.h.