RetryInterface
last analyzed

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 22
ccs 0
cts 0
cp 0
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
getStrategy() 0 1 ?
setStrategy() 0 1 ?
retry() 0 1 ?
1
<?php
2
3
/*
4
 * This file is part of the Ivory Http Adapter package.
5
 *
6
 * (c) Eric GELOEN <[email protected]>
7
 *
8
 * For the full copyright and license information, please read the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Ivory\HttpAdapter\Event\Retry;
13
14
use Ivory\HttpAdapter\Event\Retry\Strategy\RetryStrategyInterface;
15
use Ivory\HttpAdapter\Message\InternalRequestInterface;
16
17
/**
18
 * @author GeLo <[email protected]>
19
 */
20
interface RetryInterface
21
{
22
    const RETRY_COUNT = 'retry_count';
23
24
    /**
25
     * @return RetryStrategyInterface
26
     */
27
    public function getStrategy();
28
29
    /**
30
     * @param RetryStrategyInterface $strategy
31
     */
32
    public function setStrategy(RetryStrategyInterface $strategy);
33
34
    /**
35
     * @param InternalRequestInterface $internalRequest
36
     * @param bool                     $wait
37
     *
38
     * @return InternalRequestInterface|bool
39
     */
40
    public function retry(InternalRequestInterface $internalRequest, $wait = true);
41
}
42