org.apache.cassandra.utils

## Class TestRateLimiter

- java.lang.Object
- - org.jboss.byteman.rule.helper.Helper
  - - org.apache.cassandra.utils.TestRateLimiter

-     public class TestRateLimiter
      extends org.jboss.byteman.rule.helper.Helper

  Helper class to apply rate limiting during fault injection testing; for an example script, see test/resources/byteman/mutation_limiter.btm.

- - ### Field Summary

    - ### Fields inherited from class org.jboss.byteman.rule.helper.Helper

      `rule`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `TestRateLimiter(org.jboss.byteman.rule.Rule rule)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `acquire(double rate)` Acquires a single unit at the given rate.

    - ### Methods inherited from class org.jboss.byteman.rule.helper.Helper

      `activated, addCountDown, callerCheck, callerEquals, callerEquals, callerEquals, callerEquals, callerEquals, callerEquals, callerEquals, callerEquals, callerEquals, callerMatches, callerMatches, callerMatches, callerMatches, callerMatches, callerMatches, callerMatches, callerMatches, callerMatches, clear, closeTrace, countDown, createCountDown, createCounter, createCounter, createJoin, createRendezvous, createRendezvous, createTimer, deactivated, debug, decrementCounter, delay, deleteCounter, deleteRendezvous, deleteTimer, flag, flagged, formatAllStacks, formatAllStacks, formatAllStacks, formatAllStacks, formatStack, formatStack, formatStack, formatStack, formatStackBetween, formatStackBetween, formatStackBetween, formatStackBetween, formatStackBetween, formatStackBetween, formatStackBetweenMatches, formatStackBetweenMatches, formatStackBetweenMatches, formatStackBetweenMatches, formatStackBetweenMatches, formatStackBetweenMatches, formatStackMatching, formatStackMatching, formatStackMatching, formatStackMatching, formatStackMatching, formatStackMatching, formatStackRange, formatThreadStack, formatThreadStack, formatThreadStack, formatThreadStack, getCountDown, getElapsedTimeFromTimer, getObjectSize, getRendezvous, getStack, incrementCounter, incrementCounter, installed, isCountDown, isJoin, isRendezvous, joinEnlist, joinWait, joinWait, killJVM, killJVM, killThread, matchIndex, openTrace, openTrace, printFrame, printlnFrame, readCounter, readCounter, rendezvous, rendezvous, resetTimer, setTriggering, signalKill, signalKill, signalThrow, signalThrow, signalWake, signalWake, toString, trace, trace, traceAllStacks, traceAllStacks, traceAllStacks, traceAllStacks, traceAllStacks, traceAllStacks, traceClose, traceln, traceln, traceOpen, traceOpen, traceStack, traceStack, traceStack, traceStack, traceStack, traceStack, traceStackBetween, traceStackBetween, traceStackBetween, traceStackBetween, traceStackBetween, traceStackBetween, traceStackBetween, traceStackBetween, traceStackBetween, traceStackBetweenMatches, traceStackBetweenMatches, traceStackBetweenMatches, traceStackBetweenMatches, traceStackBetweenMatches, traceStackBetweenMatches, traceStackBetweenMatches, traceStackBetweenMatches, traceStackBetweenMatches, traceStackMatching, traceStackMatching, traceStackMatching, traceStackMatching, traceStackMatching, traceStackMatching, traceStackMatching, traceStackMatching, traceStackMatching, traceStackRange, traceThreadStack, traceThreadStack, traceThreadStack, traceThreadStack, traceThreadStack, traceThreadStack, triggerIndex, uninstalled, waitFor, waitFor, waiting`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### TestRateLimiter

          protected TestRateLimiter(org.jboss.byteman.rule.Rule rule)

  - ### Method Detail

    - #### acquire

          public void acquire(double rate)

      Acquires a single unit at the given rate. If the rate changes between calls, a new rate limiter is created and the old one is discarded.

Copyright © 2018 The Apache Software Foundation