final class MysqlPlatformContentRepositoryLocker (View source)

internal  
 

Utility to acquire advisory locks from a mysql/mariadb database

Methods

forContentRepositoryAndConnection(ContentRepositoryId $contentRepositoryId, Connection $connection)

No description

void
acquireLock(int $timeoutInSeconds)

Acquire a global lock for the content repository, if no lock could be acquired within timeoutInSeconds an exception is thrown

void
releaseLock()

Release a global lock for the content repository.

Details

static MysqlPlatformContentRepositoryLocker forContentRepositoryAndConnection(ContentRepositoryId $contentRepositoryId, Connection $connection)

No description

Parameters

ContentRepositoryId $contentRepositoryId
Connection $connection

Return Value

MysqlPlatformContentRepositoryLocker

void acquireLock(int $timeoutInSeconds)

Acquire a global lock for the content repository, if no lock could be acquired within timeoutInSeconds an exception is thrown

Parameters

int $timeoutInSeconds

Return Value

void

Exceptions

AcquiringLockFailed

See also

releaseLock

void releaseLock()

Release a global lock for the content repository.

Return Value

void

Exceptions

ReleasingLockFailed