18 #ifndef RECORDCOUNTWITHTIMELIMITLOGUPLOADSTRATEGY_HPP_
19 #define RECORDCOUNTWITHTIMELIMITLOGUPLOADSTRATEGY_HPP_
41 auto now = Clock::now();
45 KAA_LOG_INFO(boost::format(
"Need to upload logs - current count: %llu, threshold: %llu, lastUploadedTime: %llu, timeLimit: %llu sec")
47 lastUploadTime_ = now;
55 typedef std::chrono::system_clock Clock;
56 std::chrono::time_point<Clock> lastUploadTime_;
std::size_t uploadCountThreshold_
void setLogUploadCheckPeriod(std::size_t period)
The default ILogUploadStrategy implementation.
void setCountThreshold(std::size_t maxCount)
#define KAA_LOG_INFO(message)
RecordCountWithTimeLimitLogUploadStrategy(std::size_t countThreshold, std::size_t logUploadCheckReriod, IKaaClientContext &context)
virtual LogUploadStrategyDecision isUploadNeeded(ILogStorageStatus &status) override
Decides whether the log upload is needed.
LogUploadStrategyDecision
Log upload decisions.
virtual std::size_t getRecordsCount()=0
Returns the number of collected logs.
The public interface to represent the current log storage state.
std::size_t logUploadCheckReriod_