C# Class Senparc.Weixin.Cache.Memcached.MemcachedCacheLock

Inheritance: BaseCacheLock
Mostra file Open project: JeffreySu/WeiXinMPSDK

Public Methods

Method Description
Lock ( string resourceName ) : bool
Lock ( string resourceName, int retryCount, System.TimeSpan retryDelay ) : bool
MemcachedCacheLock ( MemcachedObjectCacheStrategy strategy, string resourceName, string key, int retryCount, System.TimeSpan retryDelay ) : System
UnLock ( string resourceName ) : void

Private Methods

Method Description
GetLockKey ( string resourceName ) : string
RetryLock ( string resourceName, int retryCount, System.TimeSpan retryDelay, Func action ) : bool

Method Details

Lock() public method

public Lock ( string resourceName ) : bool
resourceName string
return bool

Lock() public method

public Lock ( string resourceName, int retryCount, System.TimeSpan retryDelay ) : bool
resourceName string
retryCount int
retryDelay System.TimeSpan
return bool

MemcachedCacheLock() public method

public MemcachedCacheLock ( MemcachedObjectCacheStrategy strategy, string resourceName, string key, int retryCount, System.TimeSpan retryDelay ) : System
strategy MemcachedObjectCacheStrategy
resourceName string
key string
retryCount int
retryDelay System.TimeSpan
return System

UnLock() public method

public UnLock ( string resourceName ) : void
resourceName string
return void