Kea 3.3.4
isc::d2::MatchedNcr Class Reference

Wrapper for NameChangeRequest has been matched to forward and reverse domains. More...

#include <d2_queue_mgr.h>

Public Member Functions

 MatchedNcr (const dhcp_ddns::NameChangeRequestPtr &ncr, const DdnsDomainPtr &forward_domain, const DdnsDomainPtr &reverse_domain)
 Constructor.
const dhcp_ddns::D2Dhcid & getDhcid () const
 Fetches the DHCID from the NCR.
DdnsDomainPtr getForwardDomain () const
 Fetches the forward domain matched to the FQDN.
dhcp_ddns::NameChangeRequestPtr getNcr () const
 Fetches the NameChangeRequest.
DdnsDomainPtr getReverseDomain () const
 Fetches the reverse domain matched to the ip Address.
void refresh (const MatchedNcr &source)
 Update the domains from the given MatchedNcr.

Detailed Description

Wrapper for NameChangeRequest has been matched to forward and reverse domains.

This class is a wrapper which is used to add an NCR along with the forward and/or reverse domains it matches to the D2QueueMgr's queue of requests. Domain matching was formerly done by D2UpateMgr during the construction of a NameChangeTransaction. By doing the matching before queuing the request, NCRs that fail domain matching can be discarded immediately instead of wasting space on the queue. The wrapper allows the domain matching results to be preserved such that the matching need only be done once.

Definition at line 42 of file d2_queue_mgr.h.

Constructor & Destructor Documentation

◆ MatchedNcr()

isc::d2::MatchedNcr::MatchedNcr ( const dhcp_ddns::NameChangeRequestPtr & ncr,
const DdnsDomainPtr & forward_domain,
const DdnsDomainPtr & reverse_domain )

Constructor.

Parameters
ncrpointer to the NameChangeRequest.
forward_domainpointer to the matched forward DdnsDomain.
reverse_domainpointer to the matched reverse DdnsDomain.
Exceptions
D2QueueMgrErrorif ncr is empty or both forward_domain and reverse_domain are empty.

Definition at line 20 of file d2_queue_mgr.cc.

References isc_throw.

Referenced by refresh().

Member Function Documentation

◆ getDhcid()

const dhcp_ddns::D2Dhcid & isc::d2::MatchedNcr::getDhcid ( ) const
inline

Fetches the DHCID from the NCR.

Returns
a reference to the request's D2Dhcid

Definition at line 66 of file d2_queue_mgr.h.

◆ getForwardDomain()

DdnsDomainPtr isc::d2::MatchedNcr::getForwardDomain ( ) const
inline

Fetches the forward domain matched to the FQDN.

Returns
pointer to the forward domain or an empty pointer.

Definition at line 73 of file d2_queue_mgr.h.

Referenced by refresh().

◆ getNcr()

dhcp_ddns::NameChangeRequestPtr isc::d2::MatchedNcr::getNcr ( ) const
inline

Fetches the NameChangeRequest.

Returns
pointer to the NameChangeRequest.

Definition at line 59 of file d2_queue_mgr.h.

◆ getReverseDomain()

DdnsDomainPtr isc::d2::MatchedNcr::getReverseDomain ( ) const
inline

Fetches the reverse domain matched to the ip Address.

Returns
pointer to the reverse domain or an empty pointer.

Definition at line 80 of file d2_queue_mgr.h.

Referenced by refresh().

◆ refresh()

void isc::d2::MatchedNcr::refresh ( const MatchedNcr & source)

Update the domains from the given MatchedNcr.

Definition at line 36 of file d2_queue_mgr.cc.

References MatchedNcr(), getForwardDomain(), and getReverseDomain().

Here is the call graph for this function:

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