8000 [Lock] Create a lock component by jderusse · Pull Request #21093 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Lock] Create a lock component #21093

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Rename quorum implementations
  • Loading branch information
jderusse committed Feb 22, 2017
commit a1a28105a6f62825c409b1514011331d339ea7c5
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
use Symfony\Component\Lock\QuorumInterface;

/**
* MajorityQuorum is a QuorumInterface implementation where strictly more than 50% items should be successful.
* ConsensusStrategy is a QuorumInterface implementation where strictly more than 50% items should be successful.
*
* @author Jérémy Derussé <jeremy@derusse.com>
*/
class MajorityQuorum implements QuorumInterface
class ConsensusStrategy implements QuorumInterface
{
/**
* {@inheritdoc}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
use Symfony\Component\Lock\QuorumInterface;

/ 8000 **
* UnanimousQuorum is a QuorumInterface implementation where 100% of elements should be successful.
* UnanimousStrategy is a QuorumInterface implementation where 100% of elements should be successful.
*
* @author Jérémy Derussé <jeremy@derusse.com>
*/
class UnanimousQuorum implements QuorumInterface
class UnanimousStrategy implements QuorumInterface
{
/**
* {@inheritdoc}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@

namespace Symfony\Component\Lock\Tests\Quorum;

use Symfony\Component\Lock\Quorum\MajorityQuorum;
use Symfony\Component\Lock\Quorum\ConsensusStrategy;

/**
* @author Jérémy Derussé <jeremy@derusse.com>
*/
class MajorityQuorumTest extends \PHPUnit_Framework_TestCase
class ConsensusStrategyTest extends \PHPUnit_Framework_TestCase
{
/** @var MajorityQuorum */
/** @var ConsensusStrategy */
private $quorum;

public function setup()
{
$this->quorum = new MajorityQuorum();
$this->quorum = new ConsensusStrategy();
}

public function provideMetResults()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@

namespace Symfony\Component\Lock\Tests\Quorum;

use Symfony\Component\Lock\Quorum\UnanimousQuorum;
use Symfony\Component\Lock\Quorum\UnanimousStrategy;

/**
* @author Jérémy Derussé <jeremy@derusse.com>
*/
class UnanimousQuorumTest extends \PHPUnit_Framework_TestCase
class UnanimousStrategyTest extends \PHPUnit_Framework_TestCase
{
/** @var UnanimousQuorum */
/** @var UnanimousStrategy */
private $quorum;

public function setup()
{
$this->quorum = new UnanimousQuorum();
$this->quorum = new UnanimousStrategy();
}

public function provideMetResults()
Expand Down
4 changes: 2 additions & 2 deletions src/Symfony/Component/Lock/Tests/Store/CombinedStoreTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

use Symfony\Component\Lock\Exception\LockConflictedException;
use Symfony\Component\Lock\Key;
use Symfony\Component\Lock\Quorum\UnanimousQuorum;
use Symfony\Component\Lock\Quorum\UnanimousStrategy;
use Symfony\Component\Lock\QuorumInterface;
use Symfony\Component\Lock\Store\CombinedStore;
use Symfony\Component\Lock\Store\RedisStore;
Expand Down Expand Up @@ -46,7 +46,7 @@ public function getStore()
self::markTestSkipped($e->getMessage());
}

return new CombinedStore(array(new RedisStore($redis)), new UnanimousQuorum());
return new CombinedStore(array(new RedisStore($redis)), new UnanimousStrategy());
}

/** @var \PHPUnit_Framework_MockObject_MockObject */
Expand Down
0