Kea
1.9.9-git
|
Common CQL and Lease Data Methods. More...
Public Member Functions | |
CqlLeaseExchange (const CqlConnection &connection) | |
Constructor. More... | |
virtual void | createBindForSelect (AnyArray &data, StatementTag statement_tag=NULL) override=0 |
Create BIND array to receive C++ data. More... | |
virtual boost::any | retrieve () override=0 |
Copy received data into the derived class' object. More... | |
Public Member Functions inherited from isc::db::CqlExchange | |
CqlExchange () | |
Constructor. More... | |
virtual | ~CqlExchange () |
Destructor. More... | |
void | executeMutation (const CqlConnection &connection, const AnyArray &assigned_values, StatementTag statement_tag) |
Executes INSERT, UPDATE or DELETE statements. More... | |
AnyArray | executeSelect (const CqlConnection &connection, const AnyArray &where_values, StatementTag statement_tag, const bool &single=false) |
Executes SELECT statements. More... | |
bool | statementApplied (CassFuture *future, size_t *row_count=NULL, size_t *column_count=NULL) |
Check if CQL statement has been applied. More... | |
Public Member Functions inherited from isc::db::SqlExchange | |
SqlExchange () | |
Constructor. More... | |
virtual | ~SqlExchange () |
Destructor. More... | |
Protected Attributes | |
const CqlConnection & | connection_ |
Database connection. More... | |
cass_int64_t | current_expire_ |
Expiration time of lease before update. More... | |
cass_int64_t | expire_ |
Lease expiry time. More... | |
cass_bool_t | fqdn_fwd_ |
Has forward DNS update been performed? More... | |
cass_bool_t | fqdn_rev_ |
Has reverse DNS update been performed? More... | |
std::string | hostname_ |
Client hostname. More... | |
CassBlob | hwaddr_ |
Hardware address. More... | |
cass_int32_t | state_ |
Lease state. More... | |
cass_int32_t | subnet_id_ |
Subnet identifier. More... | |
std::string | user_context_ |
User context. More... | |
cass_int64_t | valid_lifetime_ |
Lease timer. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from isc::db::CqlExchange | |
static void | convertToDatabaseTime (const time_t &cltt, const uint32_t &valid_lifetime, cass_int64_t &expire) |
static void | convertFromDatabaseTime (const cass_int64_t &expire, const cass_int64_t &valid_lifetime, time_t &cltt) |
Converts time from Cassandra format. More... | |
Common CQL and Lease Data Methods.
The CqlLease4Exchange and CqlLease6Exchange classes provide the functionality to set up binding information between variables in the program and data extracted from the database. This class is the common base to both of them, containing some common methods.
Definition at line 48 of file cql_lease_mgr.cc.
|
inline |
Constructor.
connection | already open Cassandra connection. |
Definition at line 54 of file cql_lease_mgr.cc.
|
overridepure virtual |
Create BIND array to receive C++ data.
Used in executeSelect() to retrieve from database
data | array of bound objects representing data to be retrieved |
statement_tag | prepared statement being executed; defaults to an invalid index |
Implements isc::db::CqlExchange.
Implemented in isc::dhcp::CqlLease6Exchange, and isc::dhcp::CqlLease4Exchange.
|
overridepure virtual |
Copy received data into the derived class' object.
Copies information about the entity to be retrieved into a holistic object. Called in executeSelect(). Not implemented for base class CqlExchange. To be implemented in derived classes.
Implements isc::db::CqlExchange.
Implemented in isc::dhcp::CqlLease6Exchange, and isc::dhcp::CqlLease4Exchange.
|
protected |
Database connection.
Definition at line 82 of file cql_lease_mgr.cc.
Referenced by isc::dhcp::CqlLease4Exchange::getLeaseCollection(), and isc::dhcp::CqlLease6Exchange::getLeaseCollection().
|
protected |
Expiration time of lease before update.
Definition at line 94 of file cql_lease_mgr.cc.
Referenced by isc::dhcp::CqlLease4Exchange::createBindForDelete(), isc::dhcp::CqlLease6Exchange::createBindForDelete(), isc::dhcp::CqlLease4Exchange::createBindForUpdate(), and isc::dhcp::CqlLease6Exchange::createBindForUpdate().
|
protected |
Lease expiry time.
Definition at line 91 of file cql_lease_mgr.cc.
Referenced by isc::dhcp::CqlLease4Exchange::createBindForInsert(), isc::dhcp::CqlLease6Exchange::createBindForInsert(), isc::dhcp::CqlLease4Exchange::createBindForSelect(), isc::dhcp::CqlLease6Exchange::createBindForSelect(), isc::dhcp::CqlLease4Exchange::createBindForUpdate(), isc::dhcp::CqlLease6Exchange::createBindForUpdate(), isc::dhcp::CqlLease4Exchange::retrieve(), and isc::dhcp::CqlLease6Exchange::retrieve().
|
protected |
Has forward DNS update been performed?
Definition at line 100 of file cql_lease_mgr.cc.
Referenced by isc::dhcp::CqlLease4Exchange::createBindForInsert(), isc::dhcp::CqlLease6Exchange::createBindForInsert(), isc::dhcp::CqlLease4Exchange::createBindForSelect(), isc::dhcp::CqlLease6Exchange::createBindForSelect(), isc::dhcp::CqlLease4Exchange::createBindForUpdate(), isc::dhcp::CqlLease6Exchange::createBindForUpdate(), isc::dhcp::CqlLease4Exchange::retrieve(), and isc::dhcp::CqlLease6Exchange::retrieve().
|
protected |
Has reverse DNS update been performed?
Definition at line 103 of file cql_lease_mgr.cc.
Referenced by isc::dhcp::CqlLease4Exchange::createBindForInsert(), isc::dhcp::CqlLease6Exchange::createBindForInsert(), isc::dhcp::CqlLease4Exchange::createBindForSelect(), isc::dhcp::CqlLease6Exchange::createBindForSelect(), isc::dhcp::CqlLease4Exchange::createBindForUpdate(), isc::dhcp::CqlLease6Exchange::createBindForUpdate(), isc::dhcp::CqlLease4Exchange::retrieve(), and isc::dhcp::CqlLease6Exchange::retrieve().
|
protected |
Client hostname.
Definition at line 106 of file cql_lease_mgr.cc.
Referenced by isc::dhcp::CqlLease4Exchange::createBindForInsert(), isc::dhcp::CqlLease6Exchange::createBindForInsert(), isc::dhcp::CqlLease4Exchange::createBindForSelect(), isc::dhcp::CqlLease6Exchange::createBindForSelect(), isc::dhcp::CqlLease4Exchange::createBindForUpdate(), isc::dhcp::CqlLease6Exchange::createBindForUpdate(), isc::dhcp::CqlLease4Exchange::retrieve(), and isc::dhcp::CqlLease6Exchange::retrieve().
|
protected |
Hardware address.
Definition at line 85 of file cql_lease_mgr.cc.
Referenced by isc::dhcp::CqlLease4Exchange::createBindForInsert(), isc::dhcp::CqlLease6Exchange::createBindForInsert(), isc::dhcp::CqlLease4Exchange::createBindForSelect(), isc::dhcp::CqlLease6Exchange::createBindForSelect(), isc::dhcp::CqlLease4Exchange::createBindForUpdate(), isc::dhcp::CqlLease6Exchange::createBindForUpdate(), isc::dhcp::CqlLease4Exchange::retrieve(), and isc::dhcp::CqlLease6Exchange::retrieve().
|
protected |
Lease state.
Definition at line 109 of file cql_lease_mgr.cc.
Referenced by isc::dhcp::CqlLease4Exchange::createBindForInsert(), isc::dhcp::CqlLease6Exchange::createBindForInsert(), isc::dhcp::CqlLease4Exchange::createBindForSelect(), isc::dhcp::CqlLease6Exchange::createBindForSelect(), isc::dhcp::CqlLease4Exchange::createBindForUpdate(), isc::dhcp::CqlLease6Exchange::createBindForUpdate(), isc::dhcp::CqlLease4Exchange::retrieve(), and isc::dhcp::CqlLease6Exchange::retrieve().
|
protected |
Subnet identifier.
Definition at line 97 of file cql_lease_mgr.cc.
Referenced by isc::dhcp::CqlLease4Exchange::createBindForInsert(), isc::dhcp::CqlLease6Exchange::createBindForInsert(), isc::dhcp::CqlLease4Exchange::createBindForSelect(), isc::dhcp::CqlLease6Exchange::createBindForSelect(), isc::dhcp::CqlLease4Exchange::createBindForUpdate(), isc::dhcp::CqlLease6Exchange::createBindForUpdate(), isc::dhcp::CqlLease4Exchange::retrieve(), and isc::dhcp::CqlLease6Exchange::retrieve().
|
protected |
User context.
Definition at line 112 of file cql_lease_mgr.cc.
Referenced by isc::dhcp::CqlLease4Exchange::createBindForInsert(), isc::dhcp::CqlLease6Exchange::createBindForInsert(), isc::dhcp::CqlLease4Exchange::createBindForSelect(), isc::dhcp::CqlLease6Exchange::createBindForSelect(), isc::dhcp::CqlLease4Exchange::createBindForUpdate(), isc::dhcp::CqlLease6Exchange::createBindForUpdate(), isc::dhcp::CqlLease4Exchange::retrieve(), and isc::dhcp::CqlLease6Exchange::retrieve().
|
protected |
Lease timer.
Definition at line 88 of file cql_lease_mgr.cc.
Referenced by isc::dhcp::CqlLease4Exchange::createBindForInsert(), isc::dhcp::CqlLease6Exchange::createBindForInsert(), isc::dhcp::CqlLease4Exchange::createBindForSelect(), isc::dhcp::CqlLease6Exchange::createBindForSelect(), isc::dhcp::CqlLease4Exchange::createBindForUpdate(), isc::dhcp::CqlLease6Exchange::createBindForUpdate(), isc::dhcp::CqlLease4Exchange::retrieve(), and isc::dhcp::CqlLease6Exchange::retrieve().