C# 클래스 Lucene.Net.Store.RateLimiter.SimpleRateLimiter

Simple class to rate limit IO.
상속: RateLimiter
파일 보기 프로젝트 열기: paulirwin/lucene.net 1 사용 예제들

공개 메소드들

메소드 설명
Pause ( long bytes ) : long

Pauses, if necessary, to keep the instantaneous IO rate at or below the target. NOTE: multiple threads may safely use this, however the implementation is not perfectly thread safe but likely in practice this is harmless (just means in some rare cases the rate might exceed the target). It's best to call this with a biggish count, not one byte at a time.

SimpleRateLimiter ( double mbPerSec ) : System.Threading

mbPerSec is the MB/sec max IO rate

메소드 상세

Pause() 공개 메소드

Pauses, if necessary, to keep the instantaneous IO rate at or below the target. NOTE: multiple threads may safely use this, however the implementation is not perfectly thread safe but likely in practice this is harmless (just means in some rare cases the rate might exceed the target). It's best to call this with a biggish count, not one byte at a time.
public Pause ( long bytes ) : long
bytes long
리턴 long

SimpleRateLimiter() 공개 메소드

mbPerSec is the MB/sec max IO rate
public SimpleRateLimiter ( double mbPerSec ) : System.Threading
mbPerSec double
리턴 System.Threading