namespace Friendica\Core\Lock;
+use Friendica\Core\Cache\Cache;
+
/**
* Class AbstractLock
*
*/
abstract class Lock implements ILock
{
+ const TYPE_DATABASE = Cache::TYPE_DATABASE;
+ const TYPE_SEMAPHORE = 'semaphore';
+
/**
* @var array The local acquired locks
*/
}
/**
- * Releases all lock that were set by us
- *
- * @return boolean Was the unlock of all locks successful?
+ * {@inheritDoc}
*/
- public function releaseAll()
+ public function releaseAll($override = false)
{
$return = true;
foreach ($this->acquiredLocks as $acquiredLock => $hasLock) {
- if (!$this->releaseLock($acquiredLock)) {
+ if (!$this->releaseLock($acquiredLock, $override)) {
$return = false;
}
}