0 follower

Final Class Yiisoft\Mutex\Oracle\OracleMutexFactory

InheritanceYiisoft\Mutex\Oracle\OracleMutexFactory » Yiisoft\Mutex\MutexFactory

Allows creating {@see OracleMutex} mutex objects.

Method Details

Hide inherited methods

__construct() public method

public mixed __construct ( PDO $connection, string $lockMode OracleMutex::MODE_X, boolean $releaseOnCommit false )
$connection PDO

PDO connection instance to use.

$lockMode string

Lock mode to be used.

$releaseOnCommit boolean

Whether to release lock on commit.

                public function __construct(PDO $connection, string $lockMode = OracleMutex::MODE_X, bool $releaseOnCommit = false)
{
    $this->connection = $connection;
    $this->lockMode = $lockMode;
    $this->releaseOnCommit = $releaseOnCommit;
}

            
create() public method

public \Yiisoft\Mutex\MutexInterface create ( string $name )
$name string

                public function create(string $name): MutexInterface
{
    return new OracleMutex($name, $this->connection, $this->lockMode, $this->releaseOnCommit);
}