__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
namespace Aws\Retry;
use Aws\Retry\Exception\ConfigurationException;
class Configuration implements ConfigurationInterface
{
private $mode;
private $maxAttempts;
private $validModes = [
'legacy',
'standard',
'adaptive'
];
public function __construct($mode = 'legacy', $maxAttempts = 3)
{
$mode = strtolower($mode);
if (!in_array($mode, $this->validModes)) {
throw new ConfigurationException("'{$mode}' is not a valid mode."
. " The mode has to be 'legacy', 'standard', or 'adaptive'.");
}
if (!is_numeric($maxAttempts)
|| intval($maxAttempts) != $maxAttempts
|| $maxAttempts < 1
) {
throw new ConfigurationException("The 'maxAttempts' parameter has"
. " to be an integer >= 1.");
}
$this->mode = $mode;
$this->maxAttempts = intval($maxAttempts);
}
/**
* {@inheritdoc}
*/
public function getMode()
{
return $this->mode;
}
/**
* {@inheritdoc}
*/
public function getMaxAttempts()
{
return $this->maxAttempts;
}
/**
* {@inheritdoc}
*/
public function toArray()
{
return [
'mode' => $this->getMode(),
'max_attempts' => $this->getMaxAttempts(),
];
}
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| Exception | Folder | 0777 |
|
|
| Configuration.php | File | 1.36 KB | 0777 |
|
| ConfigurationInterface.php | File | 587 B | 0777 |
|
| ConfigurationProvider.php | File | 7.75 KB | 0777 |
|
| QuotaManager.php | File | 2.51 KB | 0777 |
|
| RateLimiter.php | File | 5.02 KB | 0777 |
|
| RetryHelperTrait.php | File | 1.52 KB | 0777 |
|