Method | Description | |
---|---|---|
Lock ( string key, int acquisitionTimeout, int lockTimeout, long &lockExpire, IRedisClient client ) : long |
acquire distributed, non-reentrant lock on key
|
|
Unlock ( string key, long lockExpire, IRedisClient client ) : bool |
unlock key
|
Method | Description | |
---|---|---|
CalculateLockExpire ( System.TimeSpan ts, int timeout ) : long |
|
public Lock ( string key, int acquisitionTimeout, int lockTimeout, long &lockExpire, IRedisClient client ) : long | ||
key | string | global key for this lock |
acquisitionTimeout | int | timeout for acquiring lock |
lockTimeout | int | timeout for lock, in seconds (stored as value against lock key) |
lockExpire | long | |
client | IRedisClient | |
return | long |
public Unlock ( string key, long lockExpire, IRedisClient client ) : bool | ||
key | string | |
lockExpire | long | |
client | IRedisClient | |
return | bool |