15 #include <boost/circular_buffer.hpp>
47 template<
typename PacketTypePtr>
58 : queue_type_(queue_type) {}
82 virtual bool empty()
const = 0;
85 virtual size_t getSize()
const = 0;
88 virtual void clear() = 0;
113 std::ostringstream os;
120 return (queue_type_);
125 std::string queue_type_;
142 #endif // PACKET_QUEUE_H
virtual bool empty() const =0
return True if the queue is empty.
std::string getQueueType()
Interface for managing a queue of inbound DHCP packets.
boost::shared_ptr< Element > ElementPtr
std::string getInfoStr() const
Fetches a JSON string representation of queue operational info.
QueueEnd
Enumerates choices between the two ends of the queue.
static ElementPtr createMap(const Position &pos=ZERO_POSITION())
Creates an empty MapElement type ElementPtr.
boost::shared_ptr< PacketQueue< Pkt4Ptr > > PacketQueue4Ptr
Defines pointer to the DHCPv4 queue interface used at the application level.
virtual size_t getSize() const =0
Returns the current number of packets in the buffer.
InvalidQueueParameter(const char *file, size_t line, const char *what)
boost::shared_ptr< PacketQueue< Pkt6Ptr > > PacketQueue6Ptr
Defines pointer to the DHCPv6 queue interface used at the application level.
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
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.
static ElementPtr create(const Position &pos=ZERO_POSITION())
virtual ~PacketQueue()
Virtual destructor.
virtual void enqueuePacket(PacketTypePtr packet, const SocketInfo &source)=0
Adds a packet to the queue.
PacketQueue(const std::string &queue_type)
Constructor.
virtual void clear()=0
Discards all packets currently in the buffer.
Invalid queue parameter exception.
virtual data::ElementPtr getInfo() const
Fetches operational information about the current state of the queue.
virtual PacketTypePtr dequeuePacket()=0
Dequeues the next packet from the queue.
Holds information about socket.