C# 클래스 ServiceStack.Redis.Support.Locking.DistributedLock

상속: IDistributedLock
파일 보기 프로젝트 열기: ServiceStack/ServiceStack.Redis 1 사용 예제들

공개 메소드들

메소드 설명
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

비공개 메소드들

메소드 설명
CalculateLockExpire ( System.TimeSpan ts, int timeout ) : long

메소드 상세

Lock() 공개 메소드

acquire distributed, non-reentrant lock on key
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
리턴 long

Unlock() 공개 메소드

unlock key
public Unlock ( string key, long lockExpire, IRedisClient client ) : bool
key string
lockExpire long
client IRedisClient
리턴 bool