17 #ifndef DEFAULTLOGUPLOADSTRATEGY_HPP_
18 #define DEFAULTLOGUPLOADSTRATEGY_HPP_
59 virtual void onFailure(LogDeliveryErrorCode code);
62 virtual std::size_t
getTimeout() {
return uploadTimeout_; }
96 typedef std::chrono::system_clock Clock;
97 std::chrono::time_point<Clock> nextUploadAttemptTS_;
void setRetryPeriod(std::size_t period)
The public interface for the log upload strategy.
DefaultLogUploadStrategy(IKaaChannelManagerPtr manager)
static const std::size_t DEFAULT_UPLOAD_COUNT_THRESHOLD
virtual LogUploadStrategyDecision isUploadNeeded(ILogStorageStatus &status)
Decides whether the log upload is needed.
The default ILogUploadStrategy implementation.
void setCountThreshold(std::size_t maxCount)
virtual void onTimeout()
Callback is used when the log delivery timeout detected.
void setVolumeThreshold(std::size_t maxVolume)
virtual std::size_t getTimeout()
Maximum time to wait the log delivery response.
void setBatchSize(std::size_t size)
static const std::size_t DEFAULT_UPLOAD_VOLUME_THRESHOLD
static const std::size_t DEFAULT_RETRY_PERIOD
static const std::size_t DEFAULT_BATCH_SIZE
virtual std::size_t getBatchSize()
Retrieves the maximum size of the report pack that will be delivered in the single request to the Ope...
virtual void onFailure(LogDeliveryErrorCode code)
Callback is used when the log delivery is failed.
void setUploadTimeout(std::size_t timeout)
LogUploadStrategyDecision
Log upload decisions.
static const std::size_t DEFAULT_UPLOAD_TIMEOUT
The public interface to represent the current log storage state.