ClusterlockUtility Class Reference


Public Member Functions

 setTimeout ($timeout)
 lock ($id, $waitForTimeout=true)
 unlock ($id)
 __destruct ()

Protected Member Functions

 initialize ()

Detailed Description

Definition at line 16 of file clusterlockutility.php.


Constructor & Destructor Documentation

__destruct (  ) 

Definition at line 108 of file clusterlockutility.php.


Member Function Documentation

initialize (  )  [protected]

initialize internal structures

Definition at line 46 of file clusterlockutility.php.

References getUtil().

Referenced by lock().

Here is the call graph for this function:

Here is the caller graph for this function:

lock ( id,
waitForTimeout = true 
)

Lock a (user?) id

Parameters:
int $id, id of the user to lock.
bool $waitForTimeout, wait for time out
Returns:
bool, returns true if the user was locked CacheUtility::add

Definition at line 64 of file clusterlockutility.php.

References CacheUtility::CM_MEMCACHE, and initialize().

Here is the call graph for this function:

setTimeout ( timeout  ) 

Parameters:
integer $timout how many seconds to wait for a lock before we fail

Definition at line 35 of file clusterlockutility.php.

unlock ( id  ) 

Unlock a (user?) id

Parameters:
int $id, id of the user to lock
Returns:
true if the user was unlocked CacheUtility::write

Definition at line 94 of file clusterlockutility.php.

References CacheUtility::CM_MEMCACHE.


The documentation for this class was generated from the following file:

Generated on Mon Apr 27 16:29:07 2009 for kata by  doxygen 1.5.8