Renamed Ringbuffer class to RingBuffer

This commit is contained in:
Gunnar Beutner 2012-07-09 20:11:55 +02:00
parent 5f32319c02
commit 4402a26c3e
4 changed files with 9 additions and 9 deletions

View File

@ -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();

View File

@ -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;

View File

@ -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)

View File

@ -25,7 +25,7 @@ public:
private:
static int m_Types;
static Ringbuffer m_TaskStatistics;
static RingBuffer m_TaskStatistics;
};
}