Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd6a218c

Browse files
committed
Rename quorum strategy
1 parent17248e1 commitd6a218c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎components/lock.rst‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ is being acquired, it forwards the call to all the managed stores, and it
235235
collects their responses. If a simple majority of stores have acquired the lock,
236236
then the lock is considered as acquired; otherwise is not acquired::
237237

238-
use Symfony\Component\Lock\Quorum\MajorityQuorum;
238+
use Symfony\Component\Lock\Quorum\ConsensusStrategy;
239239
use Symfony\Component\Lock\Store\CombinedStore;
240240
use Symfony\Component\Lock\Store\RedisStore;
241241

@@ -247,10 +247,10 @@ then the lock is considered as acquired; otherwise is not acquired::
247247
$stores[] = new RedisStore($redis);
248248
}
249249

250-
$store = new CombinedStore($stores, newMajorityQuorum());
250+
$store = new CombinedStore($stores, newConsensusStrategy());
251251

252-
Instead of the simple majority strategy (``MajorityQuorum``) you can use the
253-
``UnanimousQuorum`` to require the lock to be acquired in all the stores.
252+
Instead of the simple majority strategy (``ConsensusStrategy``) you can use the
253+
``UnanimousStrategy`` to require the lock to be acquired in all the stores.
254254

255255
.. _`locks`:https://en.wikipedia.org/wiki/Lock_(computer_science)
256256
.. _Packagist:https://packagist.org/packages/symfony/lock

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp