public class NullRateGate extends RateGateBase implements RateGate
Constructor and Description |
---|
NullRateGate() |
Modifier and Type | Method and Description |
---|---|
org.joda.time.Duration |
howLongToWait(int amount)
Approximately how long will I have to wait?
|
void |
waitToProceed(int amount)
Block when configured rate-limits are exceeded.
|
boolean |
waitToProceed(int amount,
org.joda.time.Duration wait)
Block when configured rate-limits are exceeded.
|
howLongToWait, setListener, waitToProceed, waitToProceed
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
howLongToWait, setListener, waitToProceed, waitToProceed
public void waitToProceed(int amount) throws InterruptedException
RateGate
waitToProceed
in interface RateGate
amount
- - number of elementsInterruptedException
- when somebody interrupted the waitingpublic boolean waitToProceed(int amount, org.joda.time.Duration wait) throws InterruptedException
waitToProceed
in interface RateGate
waitToProceed
in class RateGateBase
amount
- - number of elementswait
- - the maximum amount of time to wait, negative means infinityInterruptedException
- when somebody interrupted the waitingpublic org.joda.time.Duration howLongToWait(int amount)
howLongToWait
in interface RateGate
howLongToWait
in class RateGateBase
amount
- - number of elementsCopyright © 2013–2023. All rights reserved.