1#ifndef GENERAL_CONGESTION_MANAGER_HXX
2#define GENERAL_CONGESTION_MANAGER_HXX
119 registerFifo(fifo, mDefaultMetric, mDefaultMaxTolerance);
158 std::vector<FifoInfo> mFifos;
163 mutable Mutex mFifosMutex;
169 GeneralCongestionManager();
170 GeneralCongestionManager(
const GeneralCongestionManager& orig);
171 GeneralCongestionManager& operator=(
const GeneralCongestionManager& rhs);
Abstract base class that provides a basic congestion management interface.
@ REJECTING_NON_ESSENTIAL
Rejecting all work that is non-essential to the health of the system (ie, if dropping something is li...
An alternative to std::string, encapsulates an arbitrary buffer of bytes.
Interface for providing metrics on FIFOs, primarily used by CongestionManager.
This is a general-purpose congestion manager.
virtual EncodeStream & encodeCurrentState(EncodeStream &strm) const
Get the current state of all monitored fifos.to a stream.
virtual void logCurrentState() const
Log the current state of all monitored fifos.
virtual void registerFifo(resip::FifoStatsInterface *fifo)
Add a fifo to the collection of fifos monitored by this CongestionManager, with the default metric an...
virtual void unregisterFifo(resip::FifoStatsInterface *fifo)
Remove a fifo from the collection of fifos monitored by this CongestionManager.
virtual RejectionBehavior getRejectionBehavior(const FifoStatsInterface *fifo) const
Gets the current RejectionBehavior for this fifo, based only on the congestion-state of this fifo (ie...
virtual uint16_t getCongestionPercent(const FifoStatsInterface *fifo) const
Returns the percent of maximum tolerances that this queue is at.
virtual void registerFifo(resip::FifoStatsInterface *fifo, MetricType metric, uint32_t maxTolerance)
Add a fifo to the collection of fifos monitored by this CongestionManager, with a specified metric an...
MetricType
Enumeration of congestion metric types this class supports.
@ WAIT_TIME
The expected service time (the time it takes for new items to be serviced) This is the recommended me...
@ SIZE
The current size of the fifo.
@ TIME_DEPTH
The age of the oldest item in the fifo.
virtual ~GeneralCongestionManager()
virtual bool updateFifoTolerances(const resip::Data &fifoDescription, MetricType metric, uint32_t maxTolerance)
Update the metric type and tolerances of a given fifo that the GeneralCongestionManager is already aw...
dcm! – add UnusedChecking(_enum) below;
std::mutex Mutex
A semaphore that can be locked by only one thread at a time.