org.apache.cassandra.utils
Class Throttle
java.lang.Object
org.apache.cassandra.utils.Throttle
public class Throttle
- extends java.lang.Object
Encapsulates the timing/state required to throttle a caller to a target throughput in
bytes per millisecond, when periodically passed an absolute count of bytes.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Throttle
public Throttle(java.lang.String name,
Throttle.ThroughputFunction fun)
throttle
public void throttle(long currentBytes)
- Parameters:
currentBytes
- Bytes of throughput since the beginning of the task.
throttleDelta
public void throttleDelta(long bytesDelta)
- Parameters:
bytesDelta
- Bytes of throughput since the last call to throttle*()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Copyright © 2013 The Apache Software Foundation