7 #ifndef D2_UPDATE_MGR_H
8 #define D2_UPDATE_MGR_H
19 #include <boost/noncopyable.hpp>
20 #include <boost/shared_ptr.hpp>
96 const size_t max_transactions = MAX_TRANSACTIONS_DEFAULT);
173 return (io_service_);
178 return (max_transactions_);
248 size_t max_transactions_;
251 TransactionList transaction_list_;
This file defines the class NameChangeTransaction.
void clearTransactionList()
Immediately discards all entries in the transaction list.
const asiolink::IOServicePtr & getIOService()
Gets the D2UpdateMgr's IOService.
virtual ~D2UpdateMgr()
Destructor.
void makeTransaction(isc::dhcp_ddns::NameChangeRequestPtr &ncr)
Create a new transaction for the given request.
boost::shared_ptr< IOService > IOServicePtr
Defines a smart pointer to an IOService instance.
D2UpdateMgr creates and manages update transactions.
uint64_t server_timeouts_
void sweep()
Check current transactions; start transactions for new requests.
bool hasTransaction(const TransactionKey &key)
Convenience method that checks transaction list for the given key.
TransactionList::iterator findTransaction(const TransactionKey &key)
Search the transaction list for the given key.
size_t getQueueCount() const
Convenience method that returns the number of requests queued.
TransactionList::iterator transactionListBegin()
Returns the transaction list beg position.
boost::shared_ptr< NameChangeRequest > NameChangeRequestPtr
Defines a pointer to a NameChangeRequest.
void removeTransaction(const TransactionKey &key)
Removes the entry pointed to by key from the transaction list.
void pickNextJob()
Starts a transaction for the next eligible request in the queue.
D2UpdateMgr(D2QueueMgrPtr &queue_mgr, D2CfgMgrPtr &cfg_mgr, asiolink::IOServicePtr &io_service, const size_t max_transactions=MAX_TRANSACTIONS_DEFAULT)
Constructor.
boost::shared_ptr< D2QueueMgr > D2QueueMgrPtr
Defines a pointer for manager instances.
size_t getTransactionCount() const
Returns the current number of transactions.
std::map< TransactionKey, NameChangeTransactionPtr > TransactionList
Defines a list of transactions.
D2UpdateMgrError(const char *file, size_t line, const char *what)
boost::shared_ptr< D2CfgMgr > D2CfgMgrPtr
Defines a shared pointer to D2CfgMgr.
size_t getMaxTransactions() const
Returns the maximum number of concurrent transactions.
TransactionList::iterator transactionListEnd()
Returns the transaction list end position.
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
boost::shared_ptr< D2UpdateMgr > D2UpdateMgrPtr
Defines a pointer to a D2UpdateMgr instance.
This is a base class for exceptions thrown from the DNS library module.
Defines the logger used by the top-level component of kea-dhcp-ddns.
void checkFinishedTransactions()
Performs post-completion cleanup on completed transactions.
Container class for handling the DHCID value within a NameChangeRequest.
Thrown if the update manager encounters a general error.
This file defines the class D2QueueMgr.
void setMaxTransactions(const size_t max_transactions)
Sets the maximum number of entries allowed in the queue.
uint64_t max_update_time_
static const size_t MAX_TRANSACTIONS_DEFAULT
Maximum number of concurrent transactions NOTE that 32 is an arbitrary choice picked for the initial ...
uint64_t min_update_time_