Method | Description | |
---|---|---|
Lock ( string token ) : void |
锁定(超时时间为30秒)。
|
|
MemcachedDistributedLock ( IMemcachedClient client ) : System |
初始化一个新的基于Memcached的分布式锁。
|
|
TryLock ( string token, System.TimeSpan timeout ) : void |
尝试锁定。
|
|
UnLock ( string token ) : void |
解锁。
|
Method | Description | |
---|---|---|
GetTokens ( ) : string[] | ||
Store ( IEnumerable |
public MemcachedDistributedLock ( IMemcachedClient client ) : System | ||
client | IMemcachedClient | Memcached客户端。 |
return | System |
public TryLock ( string token, System.TimeSpan timeout ) : void | ||
token | string | 锁记号。 |
timeout | System.TimeSpan | 超时时间。 |
return | void |