## 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.

Nested Class Summary
`static interface` `Throttle.ThroughputFunction`

Constructor Summary
`Throttle(java.lang.String name, Throttle.ThroughputFunction fun)`

Method Summary
`void` `throttle(long currentBytes)`
`void` `throttleDelta(long bytesDelta)`
`java.lang.String` `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### Throttle

    public Throttle(java.lang.String name,
                    Throttle.ThroughputFunction fun)

Method Detail

### 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 © 2012 The Apache Software Foundation