LogStorage Protocol Reference

Declared in LogStorage.h

Overview

Interface for log storage.

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

Reference implementation used by default < MemLogStorage >

– addLogRecord: required method

Persists a log record.

- (BucketInfo *)addLogRecord:(LogRecord *)record

Discussion

Persists a log record.

Declared In

LogStorage.h

– getStatus required method

Returns log storage status.

- (id<LogStorageStatus>)getStatus

Discussion

Returns log storage status.

Declared In

LogStorage.h

– getNextBucket required method

Returns a log bucket or nil if there are no logs.

- (LogBucket *)getNextBucket

Discussion

Returns a log bucket or nil if there are no logs.

Declared In

LogStorage.h

– removeBucketWithId: required method

Removes already sent log records by its bucket id.

- (void)removeBucketWithId:(int32_t)bucketId

Parameters

bucketId

Unique id of sent bucket

Discussion

Removes already sent log records by its bucket id.

Use in case of a successful upload.

Declared In

LogStorage.h

– rollbackBucketWithId: required method

Notifies if sending of a log bucket with a specified id was failed.

- (void)rollbackBucketWithId:(int32_t)bucketId

Parameters

bucketId

Unique id of log bucket.

Discussion

Notifies if sending of a log bucket with a specified id was failed.

Declared In

LogStorage.h

– close required method

Closes log storage and releases all used resources (if any)

- (void)close

Discussion

Closes log storage and releases all used resources (if any)

Declared In

LogStorage.h