|
Apache Log4cxx
Version 1.5.0
|
Go to the documentation of this file.
18 #ifndef _LOG4CXX_HELPERS_CYCLICBUFFER_H
19 #define _LOG4CXX_HELPERS_CYCLICBUFFER_H
38 LOG4CXX_DECLARE_PRIVATE_MEMBER_PTR(CyclicBufferPriv, m_priv)
88 #endif //_LOG4CXX_HELPERS_CYCLICBUFFER_H
void add(const spi::LoggingEventPtr &event)
Add an event as the last event in the buffer.
void resize(int newSize)
Resize the cyclic buffer to newSize.
std::shared_ptr< LoggingEvent > LoggingEventPtr
Definition: appender.h:31
int length() const
Get the number of elements in the buffer.
spi::LoggingEventPtr get()
Get the oldest (first) element in the buffer.
CyclicBuffer is used by other appenders to hold instances of LoggingEvent for immediate or deferred d...
Definition: cyclicbuffer.h:36
CyclicBuffer(int maxSize)
Instantiate a new CyclicBuffer of at most maxSize events.
spi::LoggingEventPtr get(int i)
Get the ith oldest event currently in the buffer.