client-cpp  0.10.0
kaa::ILogUploadStrategy Class Referenceabstract

The public interface for the log upload strategy. More...

#include <ILogUploadStrategy.hpp>

+ Inheritance diagram for kaa::ILogUploadStrategy:

Public Member Functions

virtual LogUploadStrategyDecision isUploadNeeded (ILogStorageStatus &status)=0
 Decides whether the log upload is needed. More...
 
virtual std::size_t getTimeout ()=0
 Maximum time to wait the log delivery response. More...
 
virtual std::size_t getTimeoutCheckPeriod ()=0
 
virtual std::size_t getLogUploadCheckPeriod ()=0
 
virtual std::size_t getMaxParallelUploads ()=0
 Max amount of log batches allowed to be uploaded parallel. More...
 
virtual void onTimeout (ILogFailoverCommand &controller)=0
 Callback is used when the log delivery timeout detected. More...
 
virtual void onFailure (ILogFailoverCommand &controller, LogDeliveryErrorCode code)=0
 Callback is used when the log delivery is failed. More...
 
virtual ~ILogUploadStrategy ()
 

Detailed Description

The public interface for the log upload strategy.

The default implementation can be found in DefaultLogUploadStrategy.

Definition at line 46 of file ILogUploadStrategy.hpp.

Constructor & Destructor Documentation

virtual kaa::ILogUploadStrategy::~ILogUploadStrategy ( )
inlinevirtual

Definition at line 100 of file ILogUploadStrategy.hpp.

Member Function Documentation

virtual std::size_t kaa::ILogUploadStrategy::getLogUploadCheckPeriod ( )
pure virtual
virtual std::size_t kaa::ILogUploadStrategy::getMaxParallelUploads ( )
pure virtual

Max amount of log batches allowed to be uploaded parallel.

Returns
Amount of batches.

Implemented in kaa::DefaultLogUploadStrategy.

virtual std::size_t kaa::ILogUploadStrategy::getTimeout ( )
pure virtual

Maximum time to wait the log delivery response.

Parameters
[in]controller
Returns
Time in seconds.

Implemented in kaa::DefaultLogUploadStrategy.

virtual std::size_t kaa::ILogUploadStrategy::getTimeoutCheckPeriod ( )
pure virtual
virtual LogUploadStrategyDecision kaa::ILogUploadStrategy::isUploadNeeded ( ILogStorageStatus status)
pure virtual

Decides whether the log upload is needed.

The decision is made based on the current log storage status and, depending on the strategy implementation, on some additional information.

Parameters
[in]statusThe log storage status.
Returns
The log upload decision.
See Also
ILogStorageStatus
LogUploadStrategyDecision

Implemented in kaa::DefaultLogUploadStrategy, kaa::RecordCountWithTimeLimitLogUploadStrategy, kaa::StorageSizeWithTimeLimitLogUploadStrategy, kaa::PeriodicLogUploadStrategy, kaa::RecordCountLogUploadStrategy, and kaa::StorageSizeLogUploadStrategy.

virtual void kaa::ILogUploadStrategy::onFailure ( ILogFailoverCommand controller,
LogDeliveryErrorCode  code 
)
pure virtual

Callback is used when the log delivery is failed.

Parameters
[in]controller
[in]codeThe reason code of the log delivery failure.
See Also
LogDeliveryErrorCode

Implemented in kaa::DefaultLogUploadStrategy.

virtual void kaa::ILogUploadStrategy::onTimeout ( ILogFailoverCommand controller)
pure virtual

Callback is used when the log delivery timeout detected.

More information about the detection of the log delivery timeout read in the documentation for ILogCollector.

Implemented in kaa::DefaultLogUploadStrategy.


The documentation for this class was generated from the following file: