C# Class BrakePedal.MemoryThrottleRepository

Inheritance: IThrottleRepository
ファイルを表示 Open project: gopangea/BrakePedal

Public Properties

Property Type Description
CurrentDate Func

Public Methods

Method Description
AddOrIncrementWithExpiration ( IThrottleKey key, BrakePedal.Limiter limiter ) : void
CreateLockKey ( IThrottleKey key, BrakePedal.Limiter limiter ) : string
CreateThrottleKey ( IThrottleKey key, BrakePedal.Limiter limiter ) : string
GetThrottleCount ( IThrottleKey key, BrakePedal.Limiter limiter ) : long?
LockExists ( IThrottleKey key, BrakePedal.Limiter limiter ) : bool
MemoryThrottleRepository ( ) : System
MemoryThrottleRepository ( ObjectCache cache ) : System
RemoveThrottle ( IThrottleKey key, BrakePedal.Limiter limiter ) : void
SetLock ( IThrottleKey key, BrakePedal.Limiter limiter ) : void

Private Methods

Method Description
CreateBaseKeyValues ( IThrottleKey key, BrakePedal.Limiter limiter ) : List
GetUnixTimestamp ( ) : long
TimeSpanToFriendlyString ( System.TimeSpan span ) : string

Method Details

AddOrIncrementWithExpiration() public method

public AddOrIncrementWithExpiration ( IThrottleKey key, BrakePedal.Limiter limiter ) : void
key IThrottleKey
limiter BrakePedal.Limiter
return void

CreateLockKey() public method

public CreateLockKey ( IThrottleKey key, BrakePedal.Limiter limiter ) : string
key IThrottleKey
limiter BrakePedal.Limiter
return string

CreateThrottleKey() public method

public CreateThrottleKey ( IThrottleKey key, BrakePedal.Limiter limiter ) : string
key IThrottleKey
limiter BrakePedal.Limiter
return string

GetThrottleCount() public method

public GetThrottleCount ( IThrottleKey key, BrakePedal.Limiter limiter ) : long?
key IThrottleKey
limiter BrakePedal.Limiter
return long?

LockExists() public method

public LockExists ( IThrottleKey key, BrakePedal.Limiter limiter ) : bool
key IThrottleKey
limiter BrakePedal.Limiter
return bool

MemoryThrottleRepository() public method

public MemoryThrottleRepository ( ) : System
return System

MemoryThrottleRepository() public method

public MemoryThrottleRepository ( ObjectCache cache ) : System
cache ObjectCache
return System

RemoveThrottle() public method

public RemoveThrottle ( IThrottleKey key, BrakePedal.Limiter limiter ) : void
key IThrottleKey
limiter BrakePedal.Limiter
return void

SetLock() public method

public SetLock ( IThrottleKey key, BrakePedal.Limiter limiter ) : void
key IThrottleKey
limiter BrakePedal.Limiter
return void

Property Details

CurrentDate public_oe property

public Func CurrentDate
return Func