19 #ifndef CQL_LEASE_MGR_H
20 #define CQL_LEASE_MGR_H
28 #include <boost/scoped_ptr.hpp>
276 uint32_t iaid)
const override;
371 const size_t max_leases)
const override;
384 const size_t max_leases)
const override;
513 const SubnetID& last_subnet_id)
override;
544 const SubnetID& last_subnet_id)
override;
570 virtual std::string
getType()
const override {
571 return (std::string(
"cql"));
577 virtual std::string
getName()
const override;
598 virtual void commit()
override;
617 #endif // CQL_LEASE_MGR_H
bool deleteLease(const Lease4Ptr &lease) overridefinal
Deletes an IPv4 lease.
virtual void rollback() override
Rollback Transactions.
virtual void getExpiredLeases6(Lease6Collection &expired_leases, const size_t max_leases) const override
Returns a collection of expired DHCPv6 leases.
boost::shared_ptr< LeaseStatsQuery > LeaseStatsQueryPtr
Defines a pointer to a LeaseStatsQuery.
virtual uint64_t deleteExpiredReclaimedLeases4(const uint32_t secs) override
Deletes all expired and reclaimed DHCPv4 leases.
virtual LeaseStatsQueryPtr startLeaseStatsQuery4() override
Creates and runs the IPv4 lease stats query.
virtual LeaseStatsQueryPtr startSubnetRangeLeaseStatsQuery4(const SubnetID &first_subnet_id, const SubnetID &last_subnet_id) override
Creates and runs the IPv4 lease stats query for a single subnet.
virtual bool addLease(const Lease4Ptr &lease) override
Adds an IPv4 lease.
virtual LeaseStatsQueryPtr startSubnetRangeLeaseStatsQuery6(const SubnetID &first_subnet_id, const SubnetID &last_subnet_id) override
Creates and runs the IPv6 lease stats query for a single subnet.
virtual LeaseStatsQueryPtr startSubnetLeaseStatsQuery6(const SubnetID &subnet_id) override
Creates and runs the IPv6 lease stats query for a single subnet.
An abstract API for lease database.
std::vector< Lease4Ptr > Lease4Collection
A collection of IPv4 leases.
virtual uint64_t deleteExpiredReclaimedLeases6(const uint32_t secs) override
Deletes all expired and reclaimed DHCPv6 leases.
Holds DUID (DHCPv6 Unique Identifier)
virtual void updateLease6(const Lease6Ptr &lease6) override
Updates IPv6 lease.
virtual LeaseStatsQueryPtr startSubnetLeaseStatsQuery4(const SubnetID &subnet_id) override
Creates and runs the IPv4 lease stats query for a single subnet.
virtual Lease4Collection getLeases4() const override
Returns all IPv4 leases.
boost::shared_ptr< Lease4 > Lease4Ptr
Pointer to a Lease4 structure.
virtual size_t wipeLeases4(const SubnetID &subnet_id) override
Removes specified IPv4 leases.
static std::string getDBVersion()
Local version of getDBVersion() class method.
virtual void updateLease4(const Lease4Ptr &lease4) override
Updates IPv4 lease.
virtual ~CqlLeaseMgr()
Destructor (closes database)
virtual size_t wipeLeases6(const SubnetID &subnet_id) override
Removed specified IPv6 leases.
virtual VersionPair getVersion() const override
Returns backend version.
std::pair< uint32_t, uint32_t > VersionPair
Pair containing major and minor versions.
std::vector< Lease6Ptr > Lease6Collection
A collection of IPv6 leases.
virtual std::string getDescription() const override
Returns description of the backend.
virtual std::string getType() const override
Return backend type.
Defines the logger used by the top-level component of kea-dhcp-ddns.
CqlLeaseMgr(const db::DatabaseConnection::ParameterMap ¶meters)
Constructor.
virtual Lease6Ptr getLease6(Lease::Type type, const isc::asiolink::IOAddress &addr) const override
Returns existing IPv6 lease for a given IPv6 address.
Type
Type of lease or pool.
Holds Client identifier or client IPv4 address.
Hardware type that represents information from DHCPv4 packet.
virtual LeaseStatsQueryPtr startLeaseStatsQuery6() override
Creates and runs the IPv6 lease stats query.
Wraps value holding size of the page with leases.
virtual std::string getName() const override
Returns name of the database.
Common CQL connector pool.
std::map< std::string, std::string > ParameterMap
Database configuration parameter map.
The IOAddress class represents an IP addresses (version agnostic)
boost::shared_ptr< Lease6 > Lease6Ptr
Pointer to a Lease6 structure.
virtual void commit() override
Commit Transactions.
virtual Lease4Ptr getLease4(const isc::asiolink::IOAddress &addr) const override
Basic lease access methods.
virtual void getExpiredLeases4(Lease4Collection &expired_leases, const size_t max_leases) const override
Returns a collection of expired DHCPv4 leases.
virtual Lease6Collection getLeases6() const override
Returns all IPv6 leases.
uint32_t SubnetID
Unique identifier for a subnet (both v4 and v6)