client-cpp  0.7.4
kaa::SQLiteDBLogStorage Class Reference

#include <SQLiteDBLogStorage.hpp>

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

Public Member Functions

 SQLiteDBLogStorage (const std::string &dbName=KAA_DEFAULT_LOG_DB_STORAGE, int optimizationMask=(int) SQLiteOptimizationOptions::SQLITE_NO_OPTIMIZATIONS)
 
 ~SQLiteDBLogStorage ()
 
virtual void addLogRecord (LogRecordPtr record)
 Adds the log record to the storage. More...
 
virtual ILogStorageStatusgetStatus ()
 Returns the current log storage status. More...
 
virtual RecordPack getRecordBlock (std::size_t blockSize, std::size_t recordsBlockCount)
 Returns the block of log records which total size is less or equal to the specified block size. More...
 
virtual void removeRecordBlock (RecordBlockId id)
 Removes the log block marked by the specified id. More...
 
virtual void notifyUploadFailed (RecordBlockId id)
 Notifies of the delivery of the log block marked by the specified id has been failed. More...
 
virtual std::size_t getRecordsCount ()
 Returns the number of collected logs. More...
 
virtual std::size_t getConsumedVolume ()
 Returns amount of bytes collected logs are consumed. More...
 
- Public Member Functions inherited from kaa::ILogStorage
virtual ~ILogStorage ()
 
- Public Member Functions inherited from kaa::ILogStorageStatus
virtual ~ILogStorageStatus ()
 

Additional Inherited Members

- Public Types inherited from kaa::ILogStorage
typedef std::int32_t RecordBlockId
 The alias for the unique identifier of the requested log block. More...
 
typedef std::list< LogRecordPtrRecordBlock
 The alias for the log block container. More...
 
typedef std::pair
< RecordBlockId, RecordBlock
RecordPack
 The alias for the log block marked by the unique identifier. More...
 

Detailed Description

Definition at line 51 of file SQLiteDBLogStorage.hpp.

Constructor & Destructor Documentation

kaa::SQLiteDBLogStorage::SQLiteDBLogStorage ( const std::string &  dbName = KAA_DEFAULT_LOG_DB_STORAGE,
int  optimizationMask = (int) SQLiteOptimizationOptions::SQLITE_NO_OPTIMIZATIONS 
)
kaa::SQLiteDBLogStorage::~SQLiteDBLogStorage ( )

Member Function Documentation

virtual void kaa::SQLiteDBLogStorage::addLogRecord ( LogRecordPtr  record)
virtual

Adds the log record to the storage.

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 RecordPack kaa::SQLiteDBLogStorage::getRecordBlock ( std::size_t  blockSize,
std::size_t  recordsBlockCount 
)
virtual

Returns the block of log records which total size is less or equal to the specified block size.

Parameters
[in]blockSizeThe maximum size (in bytes) of the requested log record block.
Returns
The log record block marked by the unique RecordBlockId identifier.

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 the current log storage status.

Returns
The current log storage status.

Implements kaa::ILogStorage.

Definition at line 59 of file SQLiteDBLogStorage.hpp.

virtual void kaa::SQLiteDBLogStorage::notifyUploadFailed ( RecordBlockId  id)
virtual

Notifies of the delivery of the log block marked by the specified id has been failed.

Parameters
[in]idThe unique identifier of the log block.

Implements kaa::ILogStorage.

virtual void kaa::SQLiteDBLogStorage::removeRecordBlock ( RecordBlockId  id)
virtual

Removes the log block marked by the specified id.

Parameters
[in]idThe unique identifier of the log block.

Implements kaa::ILogStorage.


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