client-cpp  0.10.0
kaa::SQLiteDBLogStorage Class Reference

#include <SQLiteDBLogStorage.hpp>

+ Inheritance diagram for kaa::SQLiteDBLogStorage:
+ Collaboration diagram for kaa::SQLiteDBLogStorage:

Public Member Functions

 SQLiteDBLogStorage (IKaaClientContext &context, std::size_t bucketSize=LogStorageConstants::DEFAULT_MAX_BUCKET_SIZE, std::size_t bucketRecordCount=LogStorageConstants::DEFAULT_MAX_BUCKET_RECORD_COUNT)
 
 SQLiteDBLogStorage (IKaaClientContext &context, const std::string &dbName, int optimizationMask=(int) SQLiteOptimizationOptions::SQLITE_NO_OPTIMIZATIONS, std::size_t bucketSize=LogStorageConstants::DEFAULT_MAX_BUCKET_SIZE, std::size_t bucketRecordCount=LogStorageConstants::DEFAULT_MAX_BUCKET_RECORD_COUNT)
 
 ~SQLiteDBLogStorage ()
 
virtual BucketInfo addLogRecord (LogRecord &&record)
 Persists a log record. More...
 
virtual ILogStorageStatusgetStatus ()
 Returns a log storage status. More...
 
virtual LogBucket getNextBucket ()
 Returns a new log bucket. More...
 
virtual void removeBucket (std::int32_t bucketId)
 Tells a log storage to remove a log bucket. More...
 
virtual void rollbackBucket (std::int32_t bucketId)
 Tells a log storage to consider a log bucket as unused, i.e. a log bucket will be accessible again via getNextBucket(). More...
 
virtual std::size_t getConsumedVolume ()
 Returns amount of bytes collected logs are consumed. More...
 
virtual std::size_t getRecordsCount ()
 Returns the number of collected logs. More...
 
- Public Member Functions inherited from kaa::ILogStorage
virtual ~ILogStorage ()
 
- Public Member Functions inherited from kaa::ILogStorageStatus
virtual ~ILogStorageStatus ()
 

Detailed Description

Definition at line 56 of file SQLiteDBLogStorage.hpp.

Constructor & Destructor Documentation

kaa::SQLiteDBLogStorage::SQLiteDBLogStorage ( IKaaClientContext context,
std::size_t  bucketSize = LogStorageConstants::DEFAULT_MAX_BUCKET_SIZE,
std::size_t  bucketRecordCount = LogStorageConstants::DEFAULT_MAX_BUCKET_RECORD_COUNT 
)
kaa::SQLiteDBLogStorage::SQLiteDBLogStorage ( IKaaClientContext context,
const std::string &  dbName,
int  optimizationMask = (int) SQLiteOptimizationOptions::SQLITE_NO_OPTIMIZATIONS,
std::size_t  bucketSize = LogStorageConstants::DEFAULT_MAX_BUCKET_SIZE,
std::size_t  bucketRecordCount = LogStorageConstants::DEFAULT_MAX_BUCKET_RECORD_COUNT 
)
kaa::SQLiteDBLogStorage::~SQLiteDBLogStorage ( )

Member Function Documentation

virtual BucketInfo kaa::SQLiteDBLogStorage::addLogRecord ( LogRecord &&  record)
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

Implements kaa::ILogStorage.

virtual std::size_t kaa::SQLiteDBLogStorage::getConsumedVolume ( )
virtual

Returns amount of bytes collected logs are consumed.

Returns
Size (in bytes).

Implements kaa::ILogStorageStatus.

virtual LogBucket kaa::SQLiteDBLogStorage::getNextBucket ( )
virtual

Returns a new log bucket.

Returns
The LogBucket object.
See Also
LogBucket

Implements kaa::ILogStorage.

virtual std::size_t kaa::SQLiteDBLogStorage::getRecordsCount ( )
virtual

Returns the number of collected logs.

Returns
The number of collected logs.

Implements kaa::ILogStorageStatus.

virtual ILogStorageStatus& kaa::SQLiteDBLogStorage::getStatus ( )
inlinevirtual

Returns a log storage status.

Returns
The LogStorageStatus object.
See Also
LogStorageStatus

Implements kaa::ILogStorage.

Definition at line 71 of file SQLiteDBLogStorage.hpp.

virtual void kaa::SQLiteDBLogStorage::removeBucket ( std::int32_t  bucketId)
virtual

Tells a log storage to remove a log bucket.

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

Implements kaa::ILogStorage.

virtual void kaa::SQLiteDBLogStorage::rollbackBucket ( std::int32_t  bucketId)
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

Implements kaa::ILogStorage.


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