mirror of https://github.com/Icinga/icinga2.git
Renamed Ringbuffer class to RingBuffer
This commit is contained in:
parent
5f32319c02
commit
4402a26c3e
|
@ -2,16 +2,16 @@
|
|||
|
||||
using namespace icinga;
|
||||
|
||||
Ringbuffer::Ringbuffer(long slots)
|
||||
RingBuffer::RingBuffer(long slots)
|
||||
: m_Slots(slots, 0), m_Offset(0)
|
||||
{ }
|
||||
|
||||
int Ringbuffer::GetLength(void) const
|
||||
long RingBuffer::GetLength(void) const
|
||||
{
|
||||
return m_Slots.size();
|
||||
}
|
||||
|
||||
void Ringbuffer::InsertValue(long tv, int num)
|
||||
void RingBuffer::InsertValue(long tv, int num)
|
||||
{
|
||||
vector<int>::size_type offsetTarget = tv % m_Slots.size();
|
||||
|
||||
|
@ -28,7 +28,7 @@ void Ringbuffer::InsertValue(long tv, int num)
|
|||
m_Slots[m_Offset] += num;
|
||||
}
|
||||
|
||||
int Ringbuffer::GetValues(long span) const
|
||||
int RingBuffer::GetValues(long span) const
|
||||
{
|
||||
if (span > m_Slots.size())
|
||||
span = m_Slots.size();
|
||||
|
|
|
@ -4,12 +4,12 @@
|
|||
namespace icinga
|
||||
{
|
||||
|
||||
class I2_BASE_API Ringbuffer
|
||||
class I2_BASE_API RingBuffer
|
||||
{
|
||||
public:
|
||||
Ringbuffer(long slots);
|
||||
RingBuffer(long slots);
|
||||
|
||||
int GetLength(void) const;
|
||||
long GetLength(void) const;
|
||||
void InsertValue(long tv, int num);
|
||||
int GetValues(long span) const;
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
using namespace icinga;
|
||||
|
||||
int CIB::m_Types;
|
||||
Ringbuffer CIB::m_TaskStatistics(15 * 60);
|
||||
RingBuffer CIB::m_TaskStatistics(15 * 60);
|
||||
boost::signal<void (const ServiceStatusMessage&)> CIB::OnServiceStatusUpdate;
|
||||
|
||||
void CIB::RequireInformation(InformationType types)
|
||||
|
|
Loading…
Reference in New Issue