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