17 #include <boost/noncopyable.hpp> 137 static const size_t MAX_QUEUE_DEFAULT = 1024;
163 const size_t max_queue_size = MAX_QUEUE_DEFAULT);
182 const bool reuse_address =
false);
191 void startListening();
235 void stopListening(
const State target_stop_state = STOPPED);
245 void removeListener();
249 return (ncr_queue_.size());
254 return (max_queue_size_);
264 void setMaxQueueSize(
const size_t max_queue_size);
301 void dequeueAt(
const size_t index);
321 void updateStopState();
327 size_t max_queue_size_;
330 RequestQueue ncr_queue_;
333 boost::shared_ptr<dhcp_ddns::NameChangeListener> listener_;
339 State target_stop_state_;
State
Defines the list of possible states for D2QueueMgr.
State getMgrState() const
Returns the current state.
D2QueueMgrError(const char *file, size_t line, const char *what)
Thrown if the request queue empty and a read is attempted.
This file defines abstract classes for exchanging NameChangeRequests.
D2QueueMgr creates and manages a queue of DNS update requests.
D2QueueMgrQueueFull(const char *file, size_t line, const char *what)
boost::shared_ptr< IOService > IOServicePtr
Defines a smart pointer to an IOService instance.
NameChangeFormat
Defines the list of data wire formats supported.
boost::shared_ptr< NameChangeRequest > NameChangeRequestPtr
Defines a pointer to a NameChangeRequest.
size_t getMaxQueueSize() const
Returns the maximum number of entries allowed in the queue.
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
D2QueueMgrQueueEmpty(const char *file, size_t line, const char *what)
boost::shared_ptr< D2QueueMgr > D2QueueMgrPtr
Defines a pointer for manager instances.
D2QueueMgrReceiveError(const char *file, size_t line, const char *what)
size_t getQueueSize() const
Returns the number of entries in the queue.
std::deque< dhcp_ddns::NameChangeRequestPtr > RequestQueue
Defines a queue of requests.
This is a base class for exceptions thrown from the DNS library module.
Defines the logger used by the top-level component of kea-lfc.
Thrown if the queue manager encounters a general error.
Thrown if the request queue is full when an enqueue is attempted.
Thrown if the queue manager's receive handler is passed a failure result.
D2QueueMgrInvalidIndex(const char *file, size_t line, const char *what)
The IOAddress class represents an IP addresses (version agnostic)
This file provides the classes needed to embody, compose, and decompose DNS update requests that are ...
Thrown if a queue index is beyond the end of the queue.
Abstract class for defining application layer receive callbacks.
Result
Defines the outcome of an asynchronous NCR receive.
std::string format(const std::string &format, const std::vector< std::string > &args)
Apply Formatting.