class TakeWhile extends Backoff
- See also
Backoff.takeUntil as the api to create this strategy.
- Alphabetic
- By Inheritance
- TakeWhile
- Backoff
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ++(that: Backoff): Backoff
An alias for Backoff concatenation.
An alias for Backoff concatenation.
- Definition Classes
- Backoff
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def concat(that: Backoff): Backoff
Start creating backoffs from
that
once the current Backoff isExhausted.Start creating backoffs from
that
once the current Backoff isExhausted. You can combine one or more Backoffs by:Backoff.const(1.second).take(5) .concat(Backoff.linear(2.millis, 1.millis).take(7)) .concat(Backoff.const(9.millis))
- def duration: Duration
return the current backoff
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def isExhausted: Boolean
return true if this is Backoff.empty, when true, calling duration will return a NoSuchElementException, calling
next
will return an UnsupportedOperationException.return true if this is Backoff.empty, when true, calling duration will return a NoSuchElementException, calling
next
will return an UnsupportedOperationException. This is used to terminate backoff supplies. - final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def next: Backoff
return a new Backoff to get the next backoff
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- final def take(attempt: Int): Backoff
Only create backoffs for
attempt
number of times.Only create backoffs for
attempt
number of times. Whenattempt
is reached, a Backoff.empty will be returned.- Definition Classes
- Backoff
- Note
Calling take with a non-positive
attempt
will return a Backoff.empty, where callingduration
andnext
will throw exceptions.
- final def takeUntil(maxCumulativeBackoff: Duration): Backoff
Only create backoffs until the sum of all previous backoffs is less than or equal to
maxCumulativeBackoff
.Only create backoffs until the sum of all previous backoffs is less than or equal to
maxCumulativeBackoff
. WhenmaxCumulativeBackoff
is reached, a Backoff.empty will be returned.- Definition Classes
- Backoff
- Note
Calling takeUntil with a non-positive
maxCumulativeBackoff
will return a Backoff.empty, where callingduration
andnext
will throw exceptions.
- final def toJavaIterator: Iterator[Duration]
Convert a Backoff into a Java-friendly representation of iterator.
- final def toStream: Stream[Duration]
Convert the Backoff to a Stream[Duration]
- def toString(): String
- Definition Classes
- Backoff → AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()