LogUploadStrategy Protocol Reference
| Declared in | LogUploadStrategy.h |
|---|
Overview
Interface for log upload strategy.
Used by log collector on each adding of the new log record in order to check whether to send logs to server or clean up local storage.
Reference implementation used by default < DefaultLogUploadStrategy >
– isUploadNeededForStorageStatus:
required method
Retrieves log upload decision based on current storage status and defined upload configuration.
- (LogUploadStrategyDecision)isUploadNeededForStorageStatus:(id<LogStorageStatus>)statusReturn Value
Upload decision.
Discussion
Retrieves log upload decision based on current storage status and defined upload configuration.
Declared In
LogUploadStrategy.h
– getBatchSize
required method
Retrieves maximum size of the report pack that will be delivered in single request to server.
- (int64_t)getBatchSizeReturn Value
Size of the batch
Discussion
Retrieves maximum size of the report pack that will be delivered in single request to server.
Declared In
LogUploadStrategy.h
– getBatchCount
required method
Retrieves maximum count of the records in report pack that will be delivered in single request to server.
- (int32_t)getBatchCountReturn Value
Size of the batch
Discussion
Retrieves maximum count of the records in report pack that will be delivered in single request to server.
Declared In
LogUploadStrategy.h
– getTimeout
required method
Maximum time to wait log delivery response.
- (int32_t)getTimeoutReturn Value
Time in seconds.
Discussion
Maximum time to wait log delivery response.
Declared In
LogUploadStrategy.h
– getUploadCheckPeriod
required method
If there are records in storage we need to periodically check isUploadNeeded method. This is useful if client want to upload logs on certain timing conditions instead of log storage checks
- (int32_t)getUploadCheckPeriodReturn Value
Time in seconds
Discussion
If there are records in storage we need to periodically check isUploadNeeded method. This is useful if client want to upload logs on certain timing conditions instead of log storage checks
Declared In
LogUploadStrategy.h
– getMaxParallelUploads
required method
Number of maximum parallel uploads.
- (int64_t)getMaxParallelUploadsReturn Value
Number of maximum parallel uploads.
Declared In
LogUploadStrategy.h
– onTimeoutForController:
required method
Handles timeout of log delivery
- (void)onTimeoutForController:(id<LogFailoverCommand>)controllerDiscussion
Handles timeout of log delivery
Declared In
LogUploadStrategy.h
– onFailureForController:errorCode:
required method
Handles failure of log delivery
- (void)onFailureForController:(id<LogFailoverCommand>)controller errorCode:(LogDeliveryErrorCode)codeDiscussion
Handles failure of log delivery
Declared In
LogUploadStrategy.h