Tascalate Concurrent 0.9.1
This release REPLACES 0.9.0 - the previous one is broken due to severe error in Promises.retry
functionality as well as due to breaking changes in Promises.atLeast
that should be done in major (0.x
) release.
The changes are:
- Critical fix:
Promises.retry
functionality now restored (was endless loop if retry fails for the given attempts count) - Critical fix: wrappers of
CompletableFuture
now overridesthenCompose[Async](fn)
behavior for cancellation -- now the Promise returned from fn is cancelled as well (same as withCompletableTask
). - Critical incompatible change:
Promises.atLeast
andPromises.atLeastStrict
now returns only successfully completed promises, same asPromises.all
andPromises.any[Strict]
. If you need to check positions of successfully completed promises please use new methods:Promises.atLeastOrdered
andPromises.atLeastOrderedStrict
. Both returns list ofj.u.Optional
,null
at corresponding position means thatCompletionStage
was settled with an error, non-nullOptional
corresponds to result (emptyOptional
means that original result wasnull
). - Get rid of sneaky-throwing exceptions in timeouts handling and for
AsyncCompletions
. Generally,AsyncCompletions
now works likeCompletableFuture.join()
for theIterator / Stream
of promises. - Variants of
Promises.any[Strict]
andPromises.atLeast[Strict]
that acceptsj.u.Map
parameter now returns no more elements than it was requested. - Added
RetryCallable.of
/RetryRunnable.of
methods to simplify conversions ofCallable / Runnable
- Added
DelayPolicy.withCustomizer
to let insert custom implementations ofDelayPolicy
wrappers in chained fashion. - Added
DependentPromise.as_
with more specific function arg type; - Simplified
RetryContext
internals AggregatingPromise
now cancels remaining promises before firing events - to release resources before using results of theAggregatingPromise
itself; also this class is optimized for several usage scenarios.RetryPolicy.exceptionClassRetryable
is overridable now;