@@ -24,21 +24,21 @@ Locks are used to guarantee exclusive access to some shared resource. In
2424Symfony applications, you can use locks for example to ensure that a command is
2525not executed more than once at the same time (on the same or different servers).
2626
27- Locks are created using a :class: `Symfony\\ Component\\ Lock\\ Factory ` class,
27+ Locks are created using a :class: `Symfony\\ Component\\ Lock\\ LockFactory ` class,
2828which in turn requires another class to manage the storage of locks::
2929
3030 use Symfony\Component\Lock\LockFactory;
3131 use Symfony\Component\Lock\Store\SemaphoreStore;
3232
3333 $store = new SemaphoreStore();
34- $factory = new Factory ($store);
34+ $factory = new LockFactory ($store);
3535
3636.. versionadded :: 4.4
3737
3838 The ``Symfony\Component\Lock\LockFactory `` class was introduced in Symfony
3939 4.4. In previous versions it was called ``Symfony\Component\Lock\Factory ``.
4040
41- The lock is created by calling the :method: `Symfony\\ Component\\ Lock\\ Factory ::createLock `
41+ The lock is created by calling the :method: `Symfony\\ Component\\ Lock\\ LockFactory ::createLock `
4242method. Its first argument is an arbitrary string that represents the locked
4343resource. Then, a call to the :method: `Symfony\\ Component\\ Lock\\ LockInterface::acquire `
4444method will try to acquire the lock::
@@ -61,7 +61,7 @@ method can be safely called repeatedly, even if the lock is already acquired.
6161 Unlike other implementations, the Lock Component distinguishes locks
6262 instances even when they are created for the same resource. If a lock has
6363 to be used by several services, they should share the same ``Lock `` instance
64- returned by the ``Factory ::createLock `` method.
64+ returned by the ``LockFactory ::createLock `` method.
6565
6666.. tip ::
6767
@@ -88,7 +88,7 @@ they can be decorated with the ``RetryTillSaveStore`` class::
8888
8989 $store = new RedisStore(new \Predis\Client('tcp://localhost:6379'));
9090 $store = new RetryTillSaveStore($store);
91- $factory = new Factory ($store);
91+ $factory = new LockFactory ($store);
9292
9393 $lock = $factory->createLock('notification-flush');
9494 $lock->acquire(true);
0 commit comments