3 namespace Friendica\Core\Lock;
6 * Lock Driver Interface
8 * @author Philipp Holzer <admin@philipp.info>
13 * Checks, if a key is currently locked to a or my process
15 * @param string $key The name of the lock
18 public function isLocked($key);
22 * Acquires a lock for a given name
24 * @param string $key The Name of the lock
25 * @param integer $timeout Seconds until we give up
27 * @return boolean Was the lock successful?
29 public function acquireLock($key, $timeout = 120);
32 * Releases a lock if it was set by us
34 * @param string $key The Name of the lock
38 public function releaseLock($key);
41 * Releases all lock that were set by us
45 public function releaseAll();