#include <RetryTimer.h>
|
| RetryTimer (const std::vector< int > &retryTable) |
|
| RetryTimer (const std::vector< int > &retryTable, int randomizationPercentage) |
|
| RetryTimer (const std::vector< int > &retryTable, int decreasePercentage, int increasePercentage) |
|
std::chrono::milliseconds | calculateTimeToRetry (int retryCount) const |
|
A RetryTimer
holds information needed to compute a retry time for a thread when waiting on events.
◆ RetryTimer() [1/3]
alexaClientSDK::avsCommon::utils::RetryTimer::RetryTimer |
( |
const std::vector< int > & |
retryTable | ) |
|
Constructor.
- Parameters
-
retryTable | The table with entries for retry times. |
◆ RetryTimer() [2/3]
alexaClientSDK::avsCommon::utils::RetryTimer::RetryTimer |
( |
const std::vector< int > & |
retryTable, |
|
|
int |
randomizationPercentage |
|
) |
| |
Constructor.
- Parameters
-
retryTable | The table with entries for retry times. |
randomizationPercentage | The randomization percentage to be used while computing the distribution range around the retry time. |
◆ RetryTimer() [3/3]
alexaClientSDK::avsCommon::utils::RetryTimer::RetryTimer |
( |
const std::vector< int > & |
retryTable, |
|
|
int |
decreasePercentage, |
|
|
int |
increasePercentage |
|
) |
| |
Constructor.
- Parameters
-
retryTable | The table with entries for retry times. |
decreasePercentage | The lower bound of the retry time duration. |
increasePercentage | The upper bound of the retry time duration. |
◆ calculateTimeToRetry()
std::chrono::milliseconds alexaClientSDK::avsCommon::utils::RetryTimer::calculateTimeToRetry |
( |
int |
retryCount | ) |
const |
Method to return a randomized delay in milliseconds when threads are waiting on an event.
- Parameters
-
retryCount | The number of retries. |
- Returns
- delay in milliseconds.
The documentation for this class was generated from the following file:
- /workplace/avs-device-sdk/AVSCommon/Utils/include/AVSCommon/Utils/RetryTimer.h
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Licensed under the Apache License, Version 2.0