TITAN Library for PHP5  5.6.0
Web Software Development Kit for PHP5
lock Class Reference

Titan Lock Class. More...

Public Member Functions

 __construct ($name, $path= '/tmp/')
 
 locked ()
 
 lock ()
 
 unlock ()
 

Data Fields

 $path = '/tmp/'
 Path in which to store lock file.
 
 $error = ''
 Error message, if any.
 
 $is_locked = false
 Lock status.
 
 $wait_maximum = 10000000
 Maximum time to wait for an unlock (in microseconds) default: 10 seconds.
 
 $wait_interval = 500000
 Time to wait before trying again (in microseconds) default: .5 second.
 

Protected Attributes

 $name
 Name of lock file.
 

Detailed Description

Titan Lock Class.

Class: \tl\storage\lock

Author
James E. Bush work@.nosp@m.bush.nosp@m..cc
Version
5.6.0

Constructor & Destructor Documentation

__construct (   $name,
  $path = '/tmp/' 
)

Constructor

Parameters
string$nameName of the lock (Must be unique within the path!)
string$pathPath location to store the lock file
Returns
lock The lock manipulation object

Member Function Documentation

locked ( )

Is the lock locked?

Returns
boolean Is the lock locked?
lock ( )

Lock the file

unlock ( )

Unlock the file


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