client-cpp  0.9.0
kaa::ILogStorage Class Referenceabstract

Interface of a log storage. More...

#include <ILogStorage.hpp>

+ Inheritance diagram for kaa::ILogStorage:

Public Member Functions

virtual BucketInfo addLogRecord (LogRecord &&record)=0
 Persists a log record. More...
 
virtual ILogStorageStatusgetStatus ()=0
 Returns a log storage status. More...
 
virtual LogBucket getNextBucket ()=0
 Returns a new log bucket. More...
 
virtual void removeBucket (std::int32_t bucketId)=0
 Tells a log storage to remove a log bucket. More...
 
virtual void rollbackBucket (std::int32_t bucketId)=0
 Tells a log storage to consider a log bucket as unused, i.e. a log bucket will be accessible again via getNextBucket(). More...
 
virtual ~ILogStorage ()
 

Detailed Description

Interface of a log storage.

Persists log records, forms on demand a new log bucket for sending it to the Operation server, removes already sent log buckets, cleans up elder records in case if there is some limitation on a size of a log storage.

MemoryLogStorage is used by default.

Definition at line 40 of file ILogStorage.hpp.

Constructor & Destructor Documentation

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

Definition at line 87 of file ILogStorage.hpp.

Member Function Documentation

virtual BucketInfo kaa::ILogStorage::addLogRecord ( LogRecord &&  record)
pure virtual

Persists a log record.

Parameters
recordThe LogRecord object.
Returns
The BucketInfo object which contains information about a bucket the log record is added.
See also
LogRecord
BucketInfo

Implemented in kaa::MemoryLogStorage, and kaa::SQLiteDBLogStorage.

virtual LogBucket kaa::ILogStorage::getNextBucket ( )
pure virtual

Returns a new log bucket.

Returns
The LogBucket object.
See also
LogBucket

Implemented in kaa::MemoryLogStorage, and kaa::SQLiteDBLogStorage.

virtual ILogStorageStatus& kaa::ILogStorage::getStatus ( )
pure virtual

Returns a log storage status.

Returns
The LogStorageStatus object.
See also
LogStorageStatus

Implemented in kaa::MemoryLogStorage, and kaa::SQLiteDBLogStorage.

virtual void kaa::ILogStorage::removeBucket ( std::int32_t  bucketId)
pure virtual

Tells a log storage to remove a log bucket.

Parameters
bucketIdThe id of a log bucket.
See also
LogBucket
BucketInfo

Implemented in kaa::MemoryLogStorage, and kaa::SQLiteDBLogStorage.

virtual void kaa::ILogStorage::rollbackBucket ( std::int32_t  bucketId)
pure virtual

Tells a log storage to consider a log bucket as unused, i.e. a log bucket will be accessible again via getNextBucket().

Parameters
bucketIdThe id of a log bucket.
See also
LogBucket
BucketInfo

Implemented in kaa::MemoryLogStorage, and kaa::SQLiteDBLogStorage.


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