client-cpp
0.7.0
|
The public interface to access to the log storage. More...
#include <ILogStorage.hpp>
Public Types | |
typedef std::int32_t | RecordBlockId |
The alias for the unique identifier of the requested log block. More... | |
typedef std::list< LogRecordPtr > | RecordBlock |
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 ILogStorageStatus & | getStatus ()=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 () |
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.
typedef std::list<LogRecordPtr> kaa::ILogStorage::RecordBlock |
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.
typedef std::pair<RecordBlockId, RecordBlock> kaa::ILogStorage::RecordPack |
The alias for the log block marked by the unique identifier.
Definition at line 61 of file ILogStorage.hpp.
|
inlinevirtual |
Definition at line 98 of file ILogStorage.hpp.
|
pure virtual |
Adds the log record to the storage.
Implemented in kaa::MemoryLogStorage.
|
pure virtual |
Returns the block of log records which total size is less or equal to the specified block size.
[in] | blockSize | The maximum size (in bytes) of the requested log record block. |
RecordBlockId
identifier. Implemented in kaa::MemoryLogStorage.
|
pure virtual |
Returns the current log storage status.
Implemented in kaa::MemoryLogStorage.
|
pure virtual |
Notifies of the delivery of the log block marked by the specified id has been failed.
[in] | id | The unique identifier of the log block. |
Implemented in kaa::MemoryLogStorage.
|
pure virtual |
Removes the log block marked by the specified id.
[in] | id | The unique identifier of the log block. |
Implemented in kaa::MemoryLogStorage.