C# 클래스 Elders.Hystrix.NET.TryableSemaphore

Semaphore that only supports TryAcquire and never blocks and that supports a dynamic permit count.
Using AtomicInteger increment/decrement instead of java.util.concurrent.Semaphore since we don't need blocking and need a custom implementation to get the dynamic permit count and since AtomicInteger achieves the same behavior and performance without the more complex implementation of the actual Semaphore class using AbstractQueueSynchronizer.
파일 보기 프로젝트 열기: Elders/Hystrix.NET 1 사용 예제들

공개 메소드들

메소드 설명
GetNumberOfPermitsUsed ( ) : int
Release ( ) : void

Releases the acquired semaphore.

TryAcquire ( ) : bool

Tries to acquire the semaphore.

TryableSemaphore ( IHystrixProperty numberOfPermits ) : Java.Util.Concurrent.Atomic

메소드 상세

GetNumberOfPermitsUsed() 공개 메소드

public GetNumberOfPermitsUsed ( ) : int
리턴 int

Release() 공개 메소드

Releases the acquired semaphore.
public Release ( ) : void
리턴 void

TryAcquire() 공개 메소드

Tries to acquire the semaphore.
public TryAcquire ( ) : bool
리턴 bool

TryableSemaphore() 공개 메소드

public TryableSemaphore ( IHystrixProperty numberOfPermits ) : Java.Util.Concurrent.Atomic
numberOfPermits IHystrixProperty
리턴 Java.Util.Concurrent.Atomic