3 namespace Friendica\Core\Lock;
6 * Lock Driver Interface
8 * @author Philipp Holzer <admin@philipp.info>
14 * @brief Acquires a lock for a given name
16 * @param string $key The Name of the lock
17 * @param integer $timeout Seconds until we give up
19 * @return boolean Was the lock successful?
21 public function acquireLock($key, $timeout = 120);
24 * @brief Releases a lock if it was set by us
26 * @param string $key The Name of the lock
30 public function releaseLock($key);
33 * @brief Releases all lock that were set by us
37 public function releaseAll();