HEX
Server: Apache
System: Linux srv13.cpanelhost.cl 3.10.0-962.3.2.lve1.5.38.el7.x86_64 #1 SMP Thu Jun 18 05:28:41 EDT 2020 x86_64
User: cca63905 (4205)
PHP: 7.3.20
Disabled: NONE
Upload Files
File: //proc/self/cwd/nueva/vendor/prestashop/circuit-breaker/src/Contract/TransactionInterface.php
<?php

namespace PrestaShop\CircuitBreaker\Contract;

use DateTime;

/**
 * Once the circuit breaker call a service,
 * a transaction is initialized and stored.
 */
interface TransactionInterface
{
    /**
     * @return string the service name
     */
    public function getService();

    /**
     * @return int the number of failures to call the service
     */
    public function getFailures();

    /**
     * @return string the current state of the Circuit Breaker
     */
    public function getState();

    /**
     * @return DateTime the time when the circuit breaker move
     *                  from open to half open state
     */
    public function getThresholdDateTime();

    /**
     * Everytime the service call fails, increment the number of failures.
     *
     * @return bool
     */
    public function incrementFailures();
}