|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lucene.store.RateLimiter org.apache.lucene.store.RateLimiter.SimpleRateLimiter
public static class RateLimiter.SimpleRateLimiter
Simple class to rate limit IO.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.lucene.store.RateLimiter |
---|
RateLimiter.SimpleRateLimiter |
Constructor Summary | |
---|---|
RateLimiter.SimpleRateLimiter(double mbPerSec)
mbPerSec is the MB/sec max IO rate |
Method Summary | |
---|---|
double |
getMbPerSec()
The current mb per second rate limit. |
long |
pause(long bytes)
Pauses, if necessary, to keep the instantaneous IO rate at or below the target. |
void |
setMbPerSec(double mbPerSec)
Sets an updated mb per second rate limit. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RateLimiter.SimpleRateLimiter(double mbPerSec)
Method Detail |
---|
public void setMbPerSec(double mbPerSec)
setMbPerSec
in class RateLimiter
public double getMbPerSec()
getMbPerSec
in class RateLimiter
public long pause(long bytes)
pause
in class RateLimiter
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |