Note: If you're going to use this mutex in a forked process, you have to call {@link seedRandom()} in each instance.
Author: Markus Malkusch (markus@malkusch.de)
Inheritance: extends SpinlockMutex, implements Psr\Log\LoggerAwareInterface
Beispiel #1
0
 /**
  * Sets the connected Redis APIs.
  *
  * The Redis APIs needs to be connected yet. I.e. Redis::connect() was
  * called already.
  *
  * @param Redis[] $redisAPIs The Redis connections.
  * @param string  $name      The lock name.
  * @param int     $timeout   The time in seconds a lock expires, default is 3.
  *
  * @throws \LengthException The timeout must be greater than 0.
  */
 public function __construct(array $redisAPIs, $name, $timeout = 3)
 {
     parent::__construct($redisAPIs, $name, $timeout);
 }
Beispiel #2
0
 /**
  * Sets the Redis connections.
  *
  * @param Client[] $clients The Redis clients.
  * @param string   $name    The lock name.
  * @param int      $timeout The time in seconds a lock expires, default is 3.
  *
  * @throws \LengthException The timeout must be greater than 0.
  */
 public function __construct(array $clients, $name, $timeout = 3)
 {
     parent::__construct($clients, $name, $timeout);
 }