1
0
Fork 0

Console Lock

WIP
This commit is contained in:
Philipp Holzer 2019-08-13 21:20:41 +02:00
commit 41e2031e6b
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
9 changed files with 420 additions and 25 deletions

View file

@ -45,7 +45,25 @@ interface ILock
/**
* Releases all lock that were set by us
*
* @param bool $override Override to release all locks
*
* @return boolean Was the unlock of all locks successful?
*/
public function releaseAll();
public function releaseAll($override = false);
/**
* Returns the name of the current lock
*
* @return string
*/
public function getName();
/**
* Lists all locks
*
* @param string prefix optional a prefix to search
*
* @return array Empty if it isn't supported by the cache driver
*/
public function getLocks(string $prefix = '');
}