client-cpp  0.7.0
kaa::ILogStorage Class Referenceabstract

The public interface to access to the log storage. More...

#include <ILogStorage.hpp>

+ Inheritance diagram for kaa::ILogStorage:

Public Types

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...
 

Public Member Functions

virtual void addLogRecord (LogRecordPtr record)=0
 Adds the log record to the storage. More...
 
virtual ILogStorageStatusgetStatus ()=0
 Returns the current log storage status. More...
 
virtual RecordPack getRecordBlock (std::size_t blockSize)=0
 Returns the block of log records which total size is less or equal to the specified block size. More...
 
virtual void removeRecordBlock (RecordBlockId id)=0
 Removes the log block marked by the specified id. More...
 
virtual void notifyUploadFailed (RecordBlockId id)=0
 Notifies of the delivery of the log block marked by the specified id has been failed. More...
 
virtual ~ILogStorage ()
 

Detailed Description

The public interface to access to the log storage.

The default implementation can be found in MemoryLogStorage.

Definition at line 43 of file ILogStorage.hpp.

Member Typedef Documentation

The alias for the log block container.

Definition at line 56 of file ILogStorage.hpp.

typedef std::int32_t kaa::ILogStorage::RecordBlockId

The alias for the unique identifier of the requested log block.

The identifier may be reuse after notifying of its status via removeRecordBlock(RecordBlockId id) and notifyUploadFailed(RecordBlockId id).

Definition at line 51 of file ILogStorage.hpp.

The alias for the log block marked by the unique identifier.

Definition at line 61 of file ILogStorage.hpp.

Constructor & Destructor Documentation

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

Definition at line 98 of file ILogStorage.hpp.

Member Function Documentation

virtual void kaa::ILogStorage::addLogRecord ( LogRecordPtr  record)
pure virtual

Adds the log record to the storage.

Implemented in kaa::MemoryLogStorage.

virtual RecordPack kaa::ILogStorage::getRecordBlock ( std::size_t  blockSize)
pure 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.

Implemented in kaa::MemoryLogStorage.

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

Returns the current log storage status.

Returns
The current log storage status.

Implemented in kaa::MemoryLogStorage.

virtual void kaa::ILogStorage::notifyUploadFailed ( RecordBlockId  id)
pure 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.

Implemented in kaa::MemoryLogStorage.

virtual void kaa::ILogStorage::removeRecordBlock ( RecordBlockId  id)
pure virtual

Removes the log block marked by the specified id.

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

Implemented in kaa::MemoryLogStorage.


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