public abstract class RateLimiter extends Object
pause(long) whenever they
  want to read bytes or write bytes.| Modifier and Type | Class and Description | 
|---|---|
static class  | 
RateLimiter.SimpleRateLimiter
Simple class to rate limit IO. 
 | 
| Constructor and Description | 
|---|
RateLimiter()  | 
| Modifier and Type | Method and Description | 
|---|---|
abstract double | 
getMbPerSec()
The current mb per second rate limit. 
 | 
abstract long | 
pause(long bytes)
Pauses, if necessary, to keep the instantaneous IO
  rate at or below the target. 
 | 
abstract void | 
setMbPerSec(double mbPerSec)
Sets an updated mb per second rate limit. 
 | 
public abstract void setMbPerSec(double mbPerSec)
public abstract double getMbPerSec()
public abstract long pause(long bytes)
Note: the implementation is thread-safe
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.