Kea 2.7.5
|
Base Memfile derivation of the statistical lease data query. More...
Public Member Functions | |
MemfileLeaseStatsQuery (const SelectMode &select_mode=ALL_SUBNETS) | |
Constructor for all subnets query. | |
MemfileLeaseStatsQuery (const SubnetID &first_subnet_id, const SubnetID &last_subnet_id) | |
Constructor for subnet range query. | |
MemfileLeaseStatsQuery (const SubnetID &subnet_id) | |
Constructor for single subnet query. | |
virtual | ~MemfileLeaseStatsQuery () |
Destructor. | |
virtual bool | getNextRow (LeaseStatsRow &row) |
Fetches the next row in the result set. | |
int | getRowCount () const |
Returns the number of rows in the result set. | |
Public Member Functions inherited from isc::dhcp::LeaseStatsQuery | |
LeaseStatsQuery (const SelectMode &select_mode=ALL_SUBNETS) | |
Constructor to query statistics for all subnets. | |
LeaseStatsQuery (const SubnetID &first_subnet_id, const SubnetID &last_subnet_id) | |
Constructor to query for the stats for a range of subnets. | |
LeaseStatsQuery (const SubnetID &subnet_id) | |
Constructor to query for a single subnet's stats. | |
virtual | ~LeaseStatsQuery () |
virtual destructor | |
SubnetID | getFirstSubnetID () const |
Returns the value of first subnet ID specified (or zero) | |
SubnetID | getLastSubnetID () const |
Returns the value of last subnet ID specified (or zero) | |
SelectMode | getSelectMode () const |
Returns the selection criteria mode The value returned is based upon the constructor variant used and it indicates which query variant will be executed. | |
virtual void | start () |
Executes the query. | |
Protected Attributes | |
std::vector< LeaseStatsRow >::iterator | next_pos_ |
An iterator for accessing the next row within the result set. | |
std::vector< LeaseStatsRow > | rows_ |
A vector containing the "result set". | |
Protected Attributes inherited from isc::dhcp::LeaseStatsQuery | |
SubnetID | first_subnet_id_ |
First (or only) subnet_id in the selection criteria. | |
SubnetID | last_subnet_id_ |
Last subnet_id in the selection criteria when a range is given. | |
Additional Inherited Members | |
Public Types inherited from isc::dhcp::LeaseStatsQuery | |
enum | SelectMode { ALL_SUBNETS , SINGLE_SUBNET , SUBNET_RANGE , ALL_SUBNET_POOLS } |
Defines the types of selection criteria supported. More... | |
Base Memfile derivation of the statistical lease data query.
This class provides the functionality such as results storage and row fetching common to fulfilling the statistical lease data query.
Definition at line 266 of file memfile_lease_mgr.cc.
|
inline |
Constructor for all subnets query.
select_mode | The selection criteria which is either ALL_SUBNETS or ALL_SUBNET_POOLS |
Definition at line 272 of file memfile_lease_mgr.cc.
|
inline |
Constructor for single subnet query.
subnet_id | ID of the desired subnet |
Definition at line 279 of file memfile_lease_mgr.cc.
|
inline |
Constructor for subnet range query.
first_subnet_id | ID of the first subnet in the desired range |
last_subnet_id | ID of the last subnet in the desired range |
Definition at line 287 of file memfile_lease_mgr.cc.
|
inlinevirtual |
Destructor.
Definition at line 292 of file memfile_lease_mgr.cc.
|
inlinevirtual |
Fetches the next row in the result set.
Once the internal result set has been populated by invoking the the start() method, this method is used to iterate over the result set rows. Once the last row has been fetched, subsequent calls will return false.
row | Storage for the fetched row |
Reimplemented from isc::dhcp::LeaseStatsQuery.
Definition at line 304 of file memfile_lease_mgr.cc.
|
inline |
Returns the number of rows in the result set.
Definition at line 315 of file memfile_lease_mgr.cc.
References rows_.
|
protected |
An iterator for accessing the next row within the result set.
Definition at line 324 of file memfile_lease_mgr.cc.
Referenced by getNextRow().
|
protected |
A vector containing the "result set".
Definition at line 321 of file memfile_lease_mgr.cc.
Referenced by getNextRow(), and getRowCount().