C# 클래스 EducationPathways.ServiceBus.DynamicThrottling

Provides a way to throttle the work depending on the number of jobs it is able to complete and whether the job is penalized for trying to parallelize too many jobs.
상속: IDisposable
파일 보기 프로젝트 열기: pebblecode/EducationPathways 1 사용 예제들

공개 메소드들

메소드 설명
Dispose ( ) : void
DynamicThrottling ( int maxDegreeOfParallelism, int minDegreeOfParallelism, int penaltyAmount, int workFailedPenaltyAmount, int workCompletedParallelismGain, int intervalForRestoringDegreeOfParallelism ) : System

Initializes a new instance of DynamicThrottling.

NotifyWorkCompleted ( ) : void
NotifyWorkCompletedWithError ( ) : void
NotifyWorkStarted ( ) : void
Penalize ( ) : void
Start ( CancellationToken cancellationToken ) : void
WaitUntilAllowedParallelism ( CancellationToken cancellationToken ) : void

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void

비공개 메소드들

메소드 설명
DecrementDegreesOfParallelism ( int count ) : void
IncrementDegreesOfParallelism ( int count ) : void

메소드 상세

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

Dispose() 보호된 메소드

protected Dispose ( bool disposing ) : void
disposing bool
리턴 void

DynamicThrottling() 공개 메소드

Initializes a new instance of DynamicThrottling.
public DynamicThrottling ( int maxDegreeOfParallelism, int minDegreeOfParallelism, int penaltyAmount, int workFailedPenaltyAmount, int workCompletedParallelismGain, int intervalForRestoringDegreeOfParallelism ) : System
maxDegreeOfParallelism int Maximum number of parallel jobs.
minDegreeOfParallelism int Minimum number of parallel jobs.
penaltyAmount int Number of degrees of parallelism to remove when penalizing slightly.
workFailedPenaltyAmount int Number of degrees of parallelism to remove when work fails.
workCompletedParallelismGain int Number of degrees of parallelism to restore on work completed.
intervalForRestoringDegreeOfParallelism int Interval in milliseconds to restore 1 degree of parallelism.
리턴 System

NotifyWorkCompleted() 공개 메소드

public NotifyWorkCompleted ( ) : void
리턴 void

NotifyWorkCompletedWithError() 공개 메소드

public NotifyWorkCompletedWithError ( ) : void
리턴 void

NotifyWorkStarted() 공개 메소드

public NotifyWorkStarted ( ) : void
리턴 void

Penalize() 공개 메소드

public Penalize ( ) : void
리턴 void

Start() 공개 메소드

public Start ( CancellationToken cancellationToken ) : void
cancellationToken System.Threading.CancellationToken
리턴 void

WaitUntilAllowedParallelism() 공개 메소드

public WaitUntilAllowedParallelism ( CancellationToken cancellationToken ) : void
cancellationToken System.Threading.CancellationToken
리턴 void