Final Class Yiisoft\Mutex\Redis\RedisMutexFactory
| Inheritance | Yiisoft\Mutex\Redis\RedisMutexFactory » Yiisoft\Mutex\MutexFactory |
|---|
Allows creating {@see RedisMutex} mutex objects.
Public Methods
| Method | Description | Defined By |
|---|---|---|
| __construct() | Yiisoft\Mutex\Redis\RedisMutexFactory | |
| create() | Yiisoft\Mutex\Redis\RedisMutexFactory |
Method Details
| public mixed __construct ( \Predis\ClientInterface $client, integer $ttl = 30 ) | ||
| $client | \Predis\ClientInterface |
Predis client instance to use. |
| $ttl | integer |
Number of seconds in which the lock will be auto released. |
public function __construct(ClientInterface $client, int $ttl = 30)
{
$this->client = $client;
$this->ttl = $ttl;
}
Signup or Login in order to comment.