client-cpp  0.0.1-SNAPSHOT
kaa::ILogStorage Class Referenceabstract

#include <ILogStorage.hpp>

+ Inheritance diagram for kaa::ILogStorage:

Public Types

typedef std::list< LogRecordcontainer_type
 

Public Member Functions

virtual void addLogRecord (const LogRecord &record)=0
 
virtual container_type getRecordBlock (size_t blockSize, const std::string &blockId)=0
 
virtual void removeRecordBlock (const std::string &blockId)=0
 
virtual void notifyUploadFailed (const std::string &blockId)=0
 
virtual void removeOldestRecords (size_t allowedVolume)=0
 
virtual ~ILogStorage ()
 

Detailed Description

Interface for log storage.

Default implementation can be found in MemoryLogStorage

See also
MemoryLogStorage

Definition at line 32 of file ILogStorage.hpp.

Member Typedef Documentation

Definition at line 34 of file ILogStorage.hpp.

Constructor & Destructor Documentation

virtual kaa::ILogStorage::~ILogStorage ( )
inlinevirtual

Definition at line 69 of file ILogStorage.hpp.

Member Function Documentation

virtual void kaa::ILogStorage::addLogRecord ( const LogRecord record)
pure virtual

Adds log record to storage.

Implemented in kaa::MemoryLogStorage.

virtual container_type kaa::ILogStorage::getRecordBlock ( size_t  blockSize,
const std::string &  blockId 
)
pure virtual

Returns record block of given size

Parameters
blockSizeSize of a log record block
blockIdUnique identifier of the log record block.
Returns
Container of records

Implemented in kaa::MemoryLogStorage.

virtual void kaa::ILogStorage::notifyUploadFailed ( const std::string &  blockId)
pure virtual

Called when log block upload failed.

Parameters
blockIdUnique identifier of the log block.

Implemented in kaa::MemoryLogStorage.

virtual void kaa::ILogStorage::removeOldestRecords ( size_t  allowedVolume)
pure virtual

Shrink storage to fit allowed volume size.

Implemented in kaa::MemoryLogStorage.

virtual void kaa::ILogStorage::removeRecordBlock ( const std::string &  blockId)
pure virtual

Called when log block was successfully uploaded.

Parameters
blockIdUnique identifier of the log block.

Implemented in kaa::MemoryLogStorage.


The documentation for this class was generated from the following file: