Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. StrategyInterface.php

interface StrategyInterface

StrategyInterface defines an interface to indicate when a quorum is met and can be met.

@author Jérémy Derussé <jeremy@derusse.com>

Hierarchy

  • interface \Symfony\Component\Lock\Strategy\StrategyInterface

Expanded class hierarchy of StrategyInterface

All classes that implement StrategyInterface

1 file declares its use of StrategyInterface
CombinedStore.php in vendor/symfony/lock/Store/CombinedStore.php

File

vendor/symfony/lock/Strategy/StrategyInterface.php, line 19

Namespace

Symfony\Component\Lock\Strategy
View source
interface StrategyInterface {
    
    /**
     * Returns whether or not the quorum is met.
     */
    public function isMet(int $numberOfSuccess, int $numberOfItems) : bool;
    
    /**
     * Returns whether or not the quorum *could* be met.
     *
     * This method does not mean the quorum *would* be met for sure, but can be useful to stop a process early when you
     * known there is no chance to meet the quorum.
     */
    public function canBeMet(int $numberOfFailure, int $numberOfItems) : bool;

}

Members

Title Sort descending Modifiers Object type Summary Overrides
StrategyInterface::canBeMet public function Returns whether or not the quorum *could* be met. 2
StrategyInterface::isMet public function Returns whether or not the quorum is met. 2
RSS feed
Powered by Drupal