 |
Kea
1.5.0
|
Go to the documentation of this file.
17 #include <boost/noncopyable.hpp>
182 const bool reuse_address =
false);
249 return (ncr_queue_.size());
254 return (max_queue_size_);
321 void updateStopState();
327 size_t max_queue_size_;
333 boost::shared_ptr<dhcp_ddns::NameChangeListener> listener_;
339 State target_stop_state_;
This file provides the classes needed to embody, compose, and decompose DNS update requests that are ...
const dhcp_ddns::NameChangeRequestPtr & peekAt(const size_t index) const
Returns the entry at a given position in the queue.
Thrown if the queue manager's receive handler is passed a failure result.
void startListening()
Starts actively listening for requests.
Thrown if the request queue is full when an enqueue is attempted.
Thrown if the queue manager encounters a general error.
void setMaxQueueSize(const size_t max_queue_size)
Sets the maximum number of entries allowed in the queue.
The IOAddress class represents an IP addresses (version agnostic)
Thrown if the request queue empty and a read is attempted.
D2QueueMgrQueueFull(const char *file, size_t line, const char *what)
boost::shared_ptr< D2QueueMgr > D2QueueMgrPtr
Defines a pointer for manager instances.
boost::shared_ptr< NameChangeRequest > NameChangeRequestPtr
Defines a pointer to a NameChangeRequest.
Defines a State within the State Model.
D2QueueMgrQueueEmpty(const char *file, size_t line, const char *what)
State getMgrState() const
Returns the current state.
void stopListening(const State target_stop_state=STOPPED)
Stops listening for requests.
size_t getQueueSize() const
Returns the number of entries in the queue.
Abstract class for defining application layer receive callbacks.
This is a base class for exceptions thrown from the DNS library module.
void enqueue(dhcp_ddns::NameChangeRequestPtr &ncr)
Adds a request to the end of the queue.
Defines the logger used by the top-level component of kea-dhcp-ddns.
State
Defines the list of possible states for D2QueueMgr.
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
void dequeueAt(const size_t index)
Removes the entry at a given position in the queue.
void dequeue()
Removes the entry at the front of the queue.
std::string format(const std::string &format, const std::vector< std::string > &args)
Apply Formatting.
void initUDPListener(const isc::asiolink::IOAddress &ip_address, const uint32_t port, const dhcp_ddns::NameChangeFormat format, const bool reuse_address=false)
Initializes the listener as a UDP listener.
D2QueueMgrInvalidIndex(const char *file, size_t line, const char *what)
void clearQueue()
Removes all entries from the queue.
D2QueueMgrError(const char *file, size_t line, const char *what)
const dhcp_ddns::NameChangeRequestPtr & peek() const
Returns the entry at the front of the queue.
std::deque< dhcp_ddns::NameChangeRequestPtr > RequestQueue
Defines a queue of requests.
boost::shared_ptr< IOService > IOServicePtr
Defines a smart pointer to an IOService instance.
static const size_t MAX_QUEUE_DEFAULT
Maximum number of entries allowed in the request queue.
size_t getMaxQueueSize() const
Returns the maximum number of entries allowed in the queue.
Thrown if a queue index is beyond the end of the queue.
D2QueueMgr creates and manages a queue of DNS update requests.
D2QueueMgr(asiolink::IOServicePtr &io_service, const size_t max_queue_size=MAX_QUEUE_DEFAULT)
Constructor.
Result
Defines the outcome of an asynchronous NCR receive.
This file defines abstract classes for exchanging NameChangeRequests.
virtual void operator()(const dhcp_ddns::NameChangeListener::Result result, dhcp_ddns::NameChangeRequestPtr &ncr)
Function operator implementing the NCR receive callback.
D2QueueMgrReceiveError(const char *file, size_t line, const char *what)
NameChangeFormat
Defines the list of data wire formats supported.
virtual ~D2QueueMgr()
Destructor.
void removeListener()
Deletes the current listener.