public interface RateGate
Modifier and Type | Method and Description |
---|---|
org.joda.time.Duration |
howLongToWait()
Approximately how long will I have to wait?
|
org.joda.time.Duration |
howLongToWait(int amount)
Approximately how long will I have to wait?
|
void |
setListener(RateGateListener listener)
Set the event listener
|
void |
waitToProceed()
Block when configured rate-limits are exceeded.
|
boolean |
waitToProceed(org.joda.time.Duration wait)
Block when configured rate-limits are exceeded.
|
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.
|
void waitToProceed() throws InterruptedException
InterruptedException
- when somebody interrupted the waitingboolean waitToProceed(org.joda.time.Duration wait) throws InterruptedException
wait
- - the maximum amount of time to wait, negative means infinityInterruptedException
- when somebody interrupted the waitingvoid waitToProceed(int amount) throws InterruptedException
amount
- - number of elementsInterruptedException
- when somebody interrupted the waitingboolean waitToProceed(int amount, org.joda.time.Duration wait) throws InterruptedException
amount
- - number of elementswait
- - the maximum amount of time to wait, negative means infinityInterruptedException
- when somebody interrupted the waitingorg.joda.time.Duration howLongToWait()
org.joda.time.Duration howLongToWait(int amount)
amount
- - number of elementsvoid setListener(RateGateListener listener)
listener
- - new listenerCopyright © 2013–2023. All rights reserved.