예제 #1
0
 /**
  * Creates a callback retry strategy.
  *
  * @param callable|null                                                            $verifyCallback The verify callback.
  * @param callable|null                                                            $delayCallback  The delay callback.
  * @param \Ivory\HttpAdapter\Event\Retry\Strategy\RetryStrategyChainInterface|null $next           The next retry strategy chain.
  */
 public function __construct($verifyCallback = null, $delayCallback = null, RetryStrategyChainInterface $next = null)
 {
     parent::__construct($next);
     $this->setVerifyCallback($verifyCallback);
     $this->setDelayCallback($delayCallback);
 }
예제 #2
0
 /**
  * Creates a limited retry strategy.
  *
  * @param integer                                                                  $limit The limit.
  * @param \Ivory\HttpAdapter\Event\Retry\Strategy\RetryStrategyChainInterface|null $next  The next retry strategy chain.
  */
 public function __construct($limit = 3, RetryStrategyChainInterface $next = null)
 {
     parent::__construct($next);
     $this->setLimit($limit);
 }