You are here

class TotalFailedStatistic in Purge 8.3

Total number of failed queue items.

Hierarchy

Expanded class hierarchy of TotalFailedStatistic

File

src/Plugin/Purge/Queue/TotalFailedStatistic.php, line 12

Namespace

Drupal\purge\Plugin\Purge\Queue
View source
class TotalFailedStatistic extends Counter implements ExplainedCounterInterface {
  use StringTranslationTrait;

  /**
   * {@inheritdoc}
   */
  public function __construct($value = 0.0) {
    parent::__construct($value);
    $this
      ->disableDecrement();
  }

  /**
   * {@inheritdoc}
   */
  public function getId() {
    return 'total_failed';
  }

  /**
   * {@inheritdoc}
   */
  public function getTitle() {
    return $this
      ->t('Total number of failed queue items.');
  }

  /**
   * {@inheritdoc}
   */
  public function getDescription() {
    return $this
      ->t('Whenever a purger returns a queue item as failed, we track these failures in this statistic. However, failing items fail for various reasons and are usually expected to still succeed in the future. The total number of failures happening over time, should be seen as indicator whether a few incidents took place versus sky-rocketing failure rates because of some structural problem.');
  }

}

Members

Namesort descending Modifiers Type Description Overrides
Counter::$callback protected property The callback that is called on writes when not NULL.
Counter::$permissionDecrement protected property Whether it is possible to call ::decrement() or not.
Counter::$permissionIncrement protected property Whether it is possible to call ::increment() or not.
Counter::$permissionSet protected property Whether it is possible to call ::set() or not.
Counter::$value protected property The value of the counter.
Counter::decrement public function Decrease the counter. Overrides CounterInterface::decrement
Counter::disableDecrement public function Disable the possibility to decrement the counter. Overrides CounterInterface::disableDecrement
Counter::disableIncrement public function Disable the possibility to increment the counter. Overrides CounterInterface::disableIncrement
Counter::disableSet public function Disable the possibility of setting counter. Overrides CounterInterface::disableSet
Counter::get public function Get the current value. Overrides CounterInterface::get
Counter::getInteger public function Get the current value as integer. Overrides CounterInterface::getInteger
Counter::increment public function Increase the counter. Overrides CounterInterface::increment
Counter::set public function Overwrite the counter value. Overrides CounterInterface::set
Counter::setDirectly protected function Overwrite the counter value (permission bypass).
Counter::setWriteCallback public function Set the callback that gets called when writes occur. Overrides CounterInterface::setWriteCallback
StringTranslationTrait::$stringTranslation protected property The string translation service. 1
StringTranslationTrait::formatPlural protected function Formats a string containing a count of items.
StringTranslationTrait::getNumberOfPlurals protected function Returns the number of plurals supported by a given language.
StringTranslationTrait::getStringTranslation protected function Gets the string translation service.
StringTranslationTrait::setStringTranslation public function Sets the string translation service to use. 2
StringTranslationTrait::t protected function Translates a string to the current language or to a given language.
TotalFailedStatistic::getDescription public function Gets the description of the counter. Overrides ExplainedCounterInterface::getDescription
TotalFailedStatistic::getId public function Gets a short machine readable ID. Overrides ExplainedCounterInterface::getId
TotalFailedStatistic::getTitle public function Gets the title of the counter. Overrides ExplainedCounterInterface::getTitle
TotalFailedStatistic::__construct public function Construct a counter object. Overrides Counter::__construct