Path

ez components / documentation / api reference / trunk / webdav


eZ Components trunk

Webdav: ezcWebdavLockBackend

[ Tutorial ] [ Clients ] [ Plugin architecture ] [ Class tree ] [ Element index ] [ ChangeLog ] [ Credits ]

Interface: ezcWebdavLockBackend

Interface to be implemented by backends which should be used with the lock plugin. [source]
The lock plugin interacts with the backend only be sending ezcWebdavRequest requests, except for that it requires the backend to implement this interface.
The lock plugin will lock the backend as soon as it comes into action and release the lock, when all processing is done. The reason for the lock is to keep communication between the lock plugin and the backend atomic.

Method Summary

public void lock( $waitTime, $timeout )
Acquire a backend lock.
public void unlock( )
Release the backend lock.

Methods

lock

void lock( int $waitTime, int $timeout )
Acquire a backend lock.
This method must acquire an exclusive lock of the backend. If the backend is already locked by a different request, the must must retry to acquire the lock continously and wait between each retry $waitTime micro seconds. If $timeout microseconds have passed since the method was called, it must throw an exception of type ezcWebdavLockTimeoutException.

Parameters

Name Type Description
$waitTime int Microseconds.
$timeout int Microseconds.

unlock

void unlock( )
Release the backend lock.
This method is called to unlock the backend. The lock that was acquired using lock() must be released, so that the backend can be locked by another request.

Last updated: Mon, 21 Dec 2009