Detailed Description
DefaultLockHandler implements the LockHandler interface for relational databases.
It relies on an entity type that implements the PersistentLock interface.
Definition at line 32 of file DefaultLockHandler.php.
Public Member Functions | |
__construct (PersistenceFacade $persistenceFacade, Session $session, $lockType) | |
aquireLock (ObjectId $oid, $type, PersistentObject $currentState=null) | |
releaseLock (ObjectId $oid, $type=null) | |
releaseLocks (ObjectId $oid) | |
releaseAllLocks () | |
getLock (ObjectId $oid) | |
updateLock (ObjectId $oid, PersistentObject $object) | |
Public Attributes | |
const | SESSION_VARNAME = 'DefaultLockHandler.locks' |
Protected Member Functions | |
storeLock (Lock $lock) | |
getCurrentUser () | |
getSessionLocks () | |
addSessionLock (Lock $lock) | |
removeSessionLock (ObjectId $oid, $type) | |
Constructor & Destructor Documentation
__construct | ( | PersistenceFacade | $persistenceFacade, |
Session | $session, | ||
$lockType | |||
) |
Constructor.
- Parameters
-
$persistenceFacade $session $lockType Entity type name of PersistentLock instances
Definition at line 48 of file DefaultLockHandler.php.
Member Function Documentation
aquireLock | ( | ObjectId | $oid, |
$type, | |||
PersistentObject | $currentState = null |
||
) |
- See also
- LockHandler::aquireLock()
Implements LockHandler.
Definition at line 62 of file DefaultLockHandler.php.
releaseLock | ( | ObjectId | $oid, |
$type = null |
|||
) |
- See also
- LockHandler::releaseLock()
Implements LockHandler.
Definition at line 100 of file DefaultLockHandler.php.
releaseLocks | ( | ObjectId | $oid | ) |
- See also
- LockHandler::releaseLocks()
Implements LockHandler.
Definition at line 122 of file DefaultLockHandler.php.
releaseAllLocks | ( | ) |
- See also
- LockHandler::releaseAllLocks()
Implements LockHandler.
Definition at line 138 of file DefaultLockHandler.php.
getLock | ( | ObjectId | $oid | ) |
- See also
- LockHandler::getLock()
Implements LockHandler.
Definition at line 159 of file DefaultLockHandler.php.
updateLock | ( | ObjectId | $oid, |
PersistentObject | $object | ||
) |
- See also
- LockHandler::updateLock()
Implements LockHandler.
Definition at line 200 of file DefaultLockHandler.php.
|
protected |
Store the given Lock instance for later retrieval.
- Parameters
-
$lock Lock instance
Definition at line 217 of file DefaultLockHandler.php.
|
protected |
|
protected |
Get the Lock instances stored in the session.
- Returns
- Associative array with the serialized ObjectId instances as keys and the Lock instances as values
Definition at line 245 of file DefaultLockHandler.php.
|
protected |
Add a given Lock instance to the session.
- Parameters
-
$lock Lock instance
Definition at line 256 of file DefaultLockHandler.php.
|
protected |
Remove a given Lock instance from the session.
- Parameters
-
$oid The locked oid $type One of the Lock::Type constants or null for all types (default: null)
Definition at line 267 of file DefaultLockHandler.php.
Member Data Documentation
const SESSION_VARNAME = 'DefaultLockHandler.locks' |
Definition at line 34 of file DefaultLockHandler.php.