19 #ifndef PAGESPEED_KERNEL_SHAREDMEM_SHARED_CIRCULAR_BUFFER_H_
20 #define PAGESPEED_KERNEL_SHAREDMEM_SHARED_CIRCULAR_BUFFER_H_
28 namespace net_instaweb {
30 class AbstractSharedMem;
31 class AbstractSharedMemSegment;
49 const int buffer_capacity,
62 virtual bool Flush(
MessageHandler* message_handler) {
return true; }
80 const int buffer_capacity_;
bool InitSegment(bool parent, MessageHandler *handler)
SharedCircularBuffer(AbstractSharedMem *shm_runtime, const int buffer_capacity, const GoogleString &filename_prefix, const GoogleString &filename_suffix)
virtual bool Dump(Writer *writer, MessageHandler *handler)
Write content of data in buffer to writer, without clearing the buffer.
Definition: circular_buffer.h:32
GoogleString ToString(MessageHandler *handler)
Return data content as string. This is for test purposes.
Definition: scoped_ptr.h:30
std::string GoogleString
PAGESPEED_KERNEL_BASE_STRING_H_.
Definition: string.h:24
Definition: abstract_shared_mem.h:86
void GlobalCleanup(MessageHandler *handler)
Definition: shared_circular_buffer.h:43
virtual bool Write(const StringPiece &message, MessageHandler *handler)
Write content to circular buffer.
Interface for writing bytes to an output stream.
Definition: writer.h:29
Definition: message_handler.h:39
void Clear()
Reset circular buffer.