Kea  1.9.9-git
isc::dhcp::CqlLeaseExchange Class Referenceabstract

Common CQL and Lease Data Methods. More...

+ Inheritance diagram for isc::dhcp::CqlLeaseExchange:

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 CqlConnectionconnection_
 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...
 

Detailed Description

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.

Constructor & Destructor Documentation

isc::dhcp::CqlLeaseExchange::CqlLeaseExchange ( const CqlConnection connection)
inline

Constructor.

Parameters
connectionalready open Cassandra connection.

Definition at line 54 of file cql_lease_mgr.cc.

Member Function Documentation

virtual void isc::dhcp::CqlLeaseExchange::createBindForSelect ( AnyArray data,
StatementTag  statement_tag = NULL 
)
overridepure virtual

Create BIND array to receive C++ data.

Used in executeSelect() to retrieve from database

Parameters
dataarray of bound objects representing data to be retrieved
statement_tagprepared statement being executed; defaults to an invalid index

Implements isc::db::CqlExchange.

Implemented in isc::dhcp::CqlLease6Exchange, and isc::dhcp::CqlLease4Exchange.

virtual boost::any isc::dhcp::CqlLeaseExchange::retrieve ( )
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.

Returns
a pointer to the object retrieved.

Implements isc::db::CqlExchange.

Implemented in isc::dhcp::CqlLease6Exchange, and isc::dhcp::CqlLease4Exchange.

Member Data Documentation

const CqlConnection& isc::dhcp::CqlLeaseExchange::connection_
protected
cass_int64_t isc::dhcp::CqlLeaseExchange::current_expire_
protected

The documentation for this class was generated from the following file: