Skip to content

Tascalate Concurrent 0.9.1

Compare
Choose a tag to compare
@vsilaev vsilaev released this 15 Sep 12:34
· 65 commits to master since this release

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:

  1. Critical fix: Promises.retry functionality now restored (was endless loop if retry fails for the given attempts count)
  2. Critical fix: wrappers of CompletableFuture now overrides thenCompose[Async](fn) behavior for cancellation -- now the Promise returned from fn is cancelled as well (same as with CompletableTask).
  3. Critical incompatible change: Promises.atLeast and Promises.atLeastStrict now returns only successfully completed promises, same as Promises.all and Promises.any[Strict]. If you need to check positions of successfully completed promises please use new methods: Promises.atLeastOrdered and Promises.atLeastOrderedStrict. Both returns list of j.u.Optional, nullat corresponding position means that CompletionStage was settled with an error, non-null Optional corresponds to result (empty Optional means that original result was null).
  4. Get rid of sneaky-throwing exceptions in timeouts handling and for AsyncCompletions. Generally, AsyncCompletions now works like CompletableFuture.join() for the Iterator / Stream of promises.
  5. Variants of Promises.any[Strict] and Promises.atLeast[Strict] that accepts j.u.Map parameter now returns no more elements than it was requested.
  6. Added RetryCallable.of / RetryRunnable.of methods to simplify conversions of Callable / Runnable
  7. Added DelayPolicy.withCustomizer to let insert custom implementations of DelayPolicy wrappers in chained fashion.
  8. Added DependentPromise.as_ with more specific function arg type;
  9. Simplified RetryContext internals
  10. AggregatingPromise now cancels remaining promises before firing events - to release resources before using results of the AggregatingPromise itself; also this class is optimized for several usage scenarios.
  11. RetryPolicy.exceptionClassRetryable is overridable now;