v.0.1
This commit is contained in:
44
vendor/illuminate/contracts/Cache/Lock.php
vendored
Normal file
44
vendor/illuminate/contracts/Cache/Lock.php
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
namespace Illuminate\Contracts\Cache;
|
||||
|
||||
interface Lock
|
||||
{
|
||||
/**
|
||||
* Attempt to acquire the lock.
|
||||
*
|
||||
* @param callable|null $callback
|
||||
* @return mixed
|
||||
*/
|
||||
public function get($callback = null);
|
||||
|
||||
/**
|
||||
* Attempt to acquire the lock for the given number of seconds.
|
||||
*
|
||||
* @param int $seconds
|
||||
* @param callable|null $callback
|
||||
* @return bool
|
||||
*/
|
||||
public function block($seconds, $callback = null);
|
||||
|
||||
/**
|
||||
* Release the lock.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function release();
|
||||
|
||||
/**
|
||||
* Returns the current owner of the lock.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function owner();
|
||||
|
||||
/**
|
||||
* Releases this lock in disregard of ownership.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function forceRelease();
|
||||
}
|
Reference in New Issue
Block a user