Zeta Components - high quality PHP components

Zeta Components Manual :: Docs For Class ezcWebdavLockBackend

Webdav::ezcWebdavLockBackend

Interface ezcWebdavLockBackend

Interface to be implemented by backends which should be used with the lock plugin.

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.

Source for this file: /Webdav/src/plugins/lock/interfaces/lock_backend.php

Version:   //autogen//

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.

Documentation generated by phpDocumentor 1.4.3