|
reSIProcate
SIP stack, Dialog Usage Manager and related libraries
|
This is a general-purpose congestion manager. More...
#include <GeneralCongestionManager.hxx>
Public Types | |
| enum | MetricType { SIZE =0 , TIME_DEPTH , WAIT_TIME } |
| Enumeration of congestion metric types this class supports. More... | |
Public Types inherited from resip::CongestionManager | |
| enum | RejectionBehavior { NORMAL =0 , REJECTING_NEW_WORK =1 , REJECTING_NON_ESSENTIAL =2 } |
Public Member Functions | |
| GeneralCongestionManager (MetricType defaultMetric, uint32_t defaultMaxTolerance) | |
| 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 aware of. | |
| 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 and maximum tolerance. | |
| virtual void | registerFifo (resip::FifoStatsInterface *fifo) |
| Add a fifo to the collection of fifos monitored by this CongestionManager, with the default metric and maximum tolerance. | |
| 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; this ignores the congestion-state of other fifos in the system). | |
| virtual uint16_t | getCongestionPercent (const FifoStatsInterface *fifo) const |
| Returns the percent of maximum tolerances that this queue is at. | |
| virtual void | logCurrentState () const |
| Log the current state of all monitored fifos. | |
| virtual EncodeStream & | encodeCurrentState (EncodeStream &strm) const |
| Get the current state of all monitored fifos.to a stream. | |
Public Member Functions inherited from resip::CongestionManager | |
| CongestionManager () | |
| Constructor. | |
| virtual | ~CongestionManager () |
This is a general-purpose congestion manager.
It is not conscious of the roles of the fifos it manages, or the relationships between these fifos/roles. In other words, if a crucial fifo is fully congested, this will have no bearing on whether the other fifos in the system are considered congested. In many cases, this is a workable restriction, but it may be desirable to implement a subclass of CongestionManager that takes the system as a whole into account when determining whether a specific fifo should be considered congested. For more on implementing such a congestion manager, see the class documentation for CongestionManager.
Definition at line 24 of file GeneralCongestionManager.hxx.
Enumeration of congestion metric types this class supports.
Definition at line 30 of file GeneralCongestionManager.hxx.
| resip::GeneralCongestionManager::GeneralCongestionManager | ( | MetricType | defaultMetric, |
| uint32_t | defaultMaxTolerance | ||
| ) |
| defaultMetric | The type of metric that will be used to define a fifo's congestion state, by default:
|
| maxTolerance | The default maximum tolerance for the given metric; this determines when the RejectionBehavior changes
|
Definition at line 11 of file GeneralCongestionManager.cxx.
|
virtual |
Definition at line 22 of file GeneralCongestionManager.cxx.
|
virtual |
Get the current state of all monitored fifos.to a stream.
Implements resip::CongestionManager.
Definition at line 120 of file GeneralCongestionManager.cxx.
|
virtual |
Returns the percent of maximum tolerances that this queue is at.
Definition at line 138 of file GeneralCongestionManager.cxx.
|
virtual |
Gets the current RejectionBehavior for this fifo, based only on the congestion-state of this fifo (ie; this ignores the congestion-state of other fifos in the system).
For how this function determines congestion-state, see registerFifo().
Implements resip::CongestionManager.
Definition at line 71 of file GeneralCongestionManager.cxx.
|
virtual |
Log the current state of all monitored fifos.
Implements resip::CongestionManager.
Definition at line 101 of file GeneralCongestionManager.cxx.
|
inlinevirtual |
Add a fifo to the collection of fifos monitored by this CongestionManager, with the default metric and maximum tolerance.
| fifo | The fifo that we are registering. |
Implements resip::CongestionManager.
Definition at line 117 of file GeneralCongestionManager.hxx.
|
virtual |
Add a fifo to the collection of fifos monitored by this CongestionManager, with a specified metric and maximum tolerance.
| fifo | The fifo that we are registering. |
| metric | The type of metric that will be used to define this fifo's congestion state.
|
| maxTolerance | The maximum tolerance for the given metric; this determines when the RejectionBehavior changes
|
Definition at line 26 of file GeneralCongestionManager.cxx.
|
virtual |
Remove a fifo from the collection of fifos monitored by this CongestionManager.
| fifo | - fifo to remove |
Implements resip::CongestionManager.
Definition at line 40 of file GeneralCongestionManager.cxx.
|
virtual |
Update the metric type and tolerances of a given fifo that the GeneralCongestionManager is already aware of.
| fifoDescription | The description of the fifo that we are modifying the tolerances of. Specify as empty to adjust all registered fifos. |
| metric | The type of metric that will be used to define this fifo's congestion state.
|
| maxTolerance | The maximum tolerance for the given metric; this determines when the RejectionBehavior changes
|
Definition at line 50 of file GeneralCongestionManager.cxx.