T - Data type of elements in Queuepublic interface WaitStrategy<T>
| Modifier and Type | Interface and Description |
|---|---|
static interface |
WaitStrategy.Offerable
Represents something that may recieve data
|
static interface |
WaitStrategy.Takeable<T>
Represents something that may provide data
|
| Modifier and Type | Method and Description |
|---|---|
static <T> DirectWaitStrategy<T> |
direct() |
static <T> ExponentialBackofWaitStrategy<T> |
exponentialBackOff() |
static <T> NoWaitRetry<T> |
noWaitRetry() |
boolean |
offer(WaitStrategy.Offerable o)
Push data into a recievable type using the provided offerable
|
static <T> SpinWait<T> |
spinWait() |
T |
take(WaitStrategy.Takeable<T> t)
Attempt to take from Takeable
|
static <T> YieldWait<T> |
yieldWait() |
T take(WaitStrategy.Takeable<T> t) throws java.lang.InterruptedException
t - Takeable to take next data point fromjava.lang.InterruptedExceptionboolean offer(WaitStrategy.Offerable o) throws java.lang.InterruptedException
o - Offerable to push data to recievable typejava.lang.InterruptedExceptionstatic <T> NoWaitRetry<T> noWaitRetry()
NoWaitRetrystatic <T> ExponentialBackofWaitStrategy<T> exponentialBackOff()
ExponentialBackofWaitStrategystatic <T> DirectWaitStrategy<T> direct()
DirectWaitStrategy