client-c  0.8.1
ext_log_upload_strategies.h File Reference
+ Include dependency graph for ext_log_upload_strategies.h:

Go to the source code of this file.

Macros

#define THRESHOLD_VOLUME_FLAG   0x01
 
#define THRESHOLD_COUNT_FLAG   0x02
 
#define TIMEOUT_FLAG   0x04
 
#define KAA_LOG_UPLOAD_VOLUME_STRATEGY   (THRESHOLD_VOLUME_FLAG | THRESHOLD_COUNT_FLAG)
 
#define KAA_LOG_UPLOAD_BY_TIMEOUT_STRATEGY   (TIMEOUT_FLAG)
 
#define KAA_LOG_UPLOAD_BY_RECORD_COUNT   (THRESHOLD_COUNT_FLAG)
 
#define KAA_LOG_UPLOAD_BY_RECORD_COUNT_AND_TIMELIMIT   (THRESHOLD_COUNT_FLAG | TIMEOUT_FLAG)
 
#define KAA_LOG_UPLOAD_BY_STORAGE_SIZE   (THRESHOLD_VOLUME_FLAG)
 
#define KAA_LOG_UPLOAD_BY_STORAGE_SIZE_AND_TIMELIMIT   (THRESHOLD_VOLUME_FLAG | TIMEOUT_FLAG)
 

Functions

kaa_error_t ext_log_upload_strategy_change_strategy (void *strategy, uint8_t type)
 
kaa_error_t ext_log_upload_strategy_set_threshold_volume (void *strategy, size_t threshold_volume)
 Sets the new threshold log volume to the strategy. More...
 
kaa_error_t ext_log_upload_strategy_set_threshold_count (void *strategy, size_t threshold_count)
 Sets the new threshold log count to the strategy. More...
 
kaa_error_t ext_log_upload_strategy_set_upload_timeout (void *strategy, size_t upload_timeout)
 Sets the new upload timeout to the strategy. More...
 
kaa_error_t ext_log_upload_strategy_set_max_parallel_uploads (void *strategy, size_t count)
 Sets the max amount of log batches allowed to be uploaded parallel. More...
 
kaa_error_t ext_log_upload_strategy_set_upload_retry_period (void *strategy, size_t upload_retry_period)
 Sets the new upload retry period to the strategy. More...
 

Macro Definition Documentation

#define KAA_LOG_UPLOAD_BY_RECORD_COUNT   (THRESHOLD_COUNT_FLAG)

Definition at line 33 of file ext_log_upload_strategies.h.

#define KAA_LOG_UPLOAD_BY_RECORD_COUNT_AND_TIMELIMIT   (THRESHOLD_COUNT_FLAG | TIMEOUT_FLAG)

Definition at line 34 of file ext_log_upload_strategies.h.

#define KAA_LOG_UPLOAD_BY_STORAGE_SIZE   (THRESHOLD_VOLUME_FLAG)

Definition at line 35 of file ext_log_upload_strategies.h.

#define KAA_LOG_UPLOAD_BY_STORAGE_SIZE_AND_TIMELIMIT   (THRESHOLD_VOLUME_FLAG | TIMEOUT_FLAG)

Definition at line 36 of file ext_log_upload_strategies.h.

#define KAA_LOG_UPLOAD_BY_TIMEOUT_STRATEGY   (TIMEOUT_FLAG)

Definition at line 32 of file ext_log_upload_strategies.h.

#define KAA_LOG_UPLOAD_VOLUME_STRATEGY   (THRESHOLD_VOLUME_FLAG | THRESHOLD_COUNT_FLAG)

Definition at line 31 of file ext_log_upload_strategies.h.

#define THRESHOLD_COUNT_FLAG   0x02

Definition at line 28 of file ext_log_upload_strategies.h.

#define THRESHOLD_VOLUME_FLAG   0x01

Copyright 2014-2016 CyberVision, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

 http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Definition at line 27 of file ext_log_upload_strategies.h.

#define TIMEOUT_FLAG   0x04

Definition at line 29 of file ext_log_upload_strategies.h.

Function Documentation

kaa_error_t ext_log_upload_strategy_change_strategy ( void *  strategy,
uint8_t  type 
)
kaa_error_t ext_log_upload_strategy_set_max_parallel_uploads ( void *  strategy,
size_t  count 
)

Sets the max amount of log batches allowed to be uploaded parallel.

Parameters
strategyThe strategy instance.
countThe new max amount.
Returns
Error code.
kaa_error_t ext_log_upload_strategy_set_threshold_count ( void *  strategy,
size_t  threshold_count 
)

Sets the new threshold log count to the strategy.

Parameters
strategyThe strategy instance.
threshold_countThe new threshold log count.
Returns
Error code.
kaa_error_t ext_log_upload_strategy_set_threshold_volume ( void *  strategy,
size_t  threshold_volume 
)

Sets the new threshold log volume to the strategy.

Parameters
strategyThe strategy instance.
threshold_volumeThe new threshold volume value in bytes.
Returns
Error code.
kaa_error_t ext_log_upload_strategy_set_upload_retry_period ( void *  strategy,
size_t  upload_retry_period 
)

Sets the new upload retry period to the strategy.

Parameters
strategyThe strategy instance.
upload_retry_periodThe new upload retry period value in seconds.
Returns
Error code.
kaa_error_t ext_log_upload_strategy_set_upload_timeout ( void *  strategy,
size_t  upload_timeout 
)

Sets the new upload timeout to the strategy.

Parameters
strategyThe strategy instance.
upload_timeoutThe new upload timeout in seconds.
Returns
Error code.