Toggle navigation
Hot Examples
EN
EN
RU
DE
FR
ES
PT
IT
JP
ZH
KO
PHP
PHP
C#
Java
Go
C++
Python
JS
TS
Search
Home
Cml
Interfaces
Lock
PHP Interface Cml\Interfaces\Lock
Show file
Open project: linhecheng/cmlphp
Public Methods
Method
Description
lock
(
string
$key
,
boolean
$wouldBlock
= false ) :
mixed
上锁
setExpire
(
integer
$expire
= 100 ) :
Redis
设置锁的过期时间
unlock
(
string
$key
) :
void
解锁
Method Details
lock()
public
method
上锁
public
lock
(
string
$key
,
boolean
$wouldBlock
= false ) :
mixed
$key
string
要解锁的锁的key
$wouldBlock
boolean
是否堵塞
return
mixed
setExpire()
public
method
设置锁的过期时间
public
setExpire
(
integer
$expire
= 100 ) :
Redis
$expire
integer
return
Cml\Lock\Redis
| \Cml\Lock\Memcache | \Cml\Lock\File
unlock()
public
method
解锁
public
unlock
(
string
$key
) :
void
$key
string
return
void