Polling & Timeout-related functionality
Features
Promise interface is extended with timeout-related methods
Promise.onTimeout(delay, [cancelOnTimeout=true])Promise.orTimeout(defaultValue, delay, [cancelOnTimeout=true)Promise.delay(delay, [delayOnError=true])
Additionally, there is a method to specify initial delayCompletableTask.delay(delay, executor)
Re-tryable polling support
Promises now extended with several methods that allows polling Runnable / Callable according to RetryPolicy until result is available:
Promises.poll(runnable, executor, retryPolicy)Promises.poll(callable, executor, retryPolicy)Promises.pollOptional(callableWithOptionalResult executor, retryPolicy)
Easing creation of DependentPromise
Promise now have a dependent() method that converts this Promise to a DependentPromise to allow writing of fluent API chains.
Promises combinators methods now have additional overloads
Promises.all / any / atLeast and corresponding *Strict now overloaded to accept a list of Promise-es in addition to vararg array.
Bug fixes
None