t3lib_lock Klassenreferenz

Aufstellung aller Elemente

Öffentliche Methoden

 __construct ($id, $method='', $loops=0, $steps=0)
 __destruct ()
 acquire ()
 release ()
 getMethod ()
 getId ()
 getResource ()
 getLockStatus ()
 sysLog ($message, $severity=0)

Geschützte Attribute

 $method
 $id
 $resource
 $filepointer
 $isAcquired = false
 $loops = 150
 $step = 200

Beschreibung der Konstruktoren und Destruktoren

t3lib_lock::__construct ( id,
method = '',
loops = 0,
steps = 0 
)

Constructor: initializes locking, check input parameters and set variables accordingly.

Parameter:
string ID to identify this lock in the system
string Define which locking method to use. Defaults to "simple".
integer Number of times a locked resource is tried to be acquired. This is only used by manual locks like the "simple" method.
integer Milliseconds after lock acquire is retried. $loops * $step results in the maximum delay of a lock. Only used by manual locks like the "simple" method.
Rückgabe:
boolean Returns true unless something went wrong
t3lib_lock::__destruct (  ) 

Destructor: Releases lock automatically when instance is destroyed.

Rückgabe:
void

Dokumentation der Elementfunktionen

t3lib_lock::acquire (  ) 

Acquire a lock and return when successful. If the lock is already open, the client will be

It is important to know that the lock will be acquired in any case, even if the request was blocked first. Therefore, the lock needs to be released in every situation.

Rückgabe:
boolean Returns true if lock could be acquired without waiting, false otherwise.
t3lib_lock::getId (  ) 

Return the ID which is currently used

Rückgabe:
string Locking ID
t3lib_lock::getLockStatus (  ) 

Return the status of a lock

Rückgabe:
string Returns true if lock is acquired, false otherwise
t3lib_lock::getMethod (  ) 

Return the locking method which is currently used

Rückgabe:
string Locking method
t3lib_lock::getResource (  ) 

Return the resource which is currently used. Depending on the locking method this can be a filename or a semaphore resource.

Rückgabe:
mixed Locking resource (filename as string or semaphore as resource)
t3lib_lock::release (  ) 

Release the lock

Rückgabe:
boolean Returns true on success or false on failure
t3lib_lock::sysLog ( message,
severity = 0 
)

Adds a common log entry for this locking API using t3lib_div::sysLog(). Example: 25-02-08 17:58 - cms: Locking [simple::0aeafd2a67a6bb8b9543fb9ea25ecbe2]: Acquired

Parameter:
string $message: The message to be logged
integer $severity: Severity - 0 is info (default), 1 is notice, 2 is warning, 3 is error, 4 is fatal error
Rückgabe:
void

Die Dokumentation für diese Klasse wurde erzeugt aufgrund der Datei:
 Alle Klassen Namensbereiche Funktionen Variablen

Erzeugt am Wed Oct 28 16:40:23 2009 für Typo3 von  doxygen 1.6.1