Skip to content

Internal Refactoring & Bug Fixing

Compare
Choose a tag to compare
@vsilaev vsilaev released this 14 Mar 15:57
· 271 commits to master since this release
0cd63ae

Features

DependentPromise changes

  • DependentPromise now is an interface
  • ConfigurableDependentPromise is an implementation of DependentPromise -- it provides support for both explicit (available previously) and implicit (new functionality) enlistment of origins

Promise changes

  • Promise.dependent(implicitlyEnlistDependency) is added to let create a variant of promise that implicitly enlists dependency (previously only explicit enlistments via additional argument was possible)
  • Promise.raw() method is added to return a Promise that is free from any behavior decorators (like ConfigurableDependentPromise)

Helper classes

  • Adapters and decorators hierarchy has been revisited to provide classes that simplifies implementation of custom decorators / adapters

Re-tryable polling support

  • Promises.poll(runnable, executor, retryPolicy) is renamed to Promises.retry(runnable, executor, retryPolicy)
  • Promises.poll(callable, executor, retryPolicy) is complemented by Promises.retry(callable, executor, retryPolicy)
    The naming now reflects the purpose: retry methods are keep executing until no exception is thrown (even if method returns null result), poll / pollOptional are executed unless result (non-null or non-empty Optional) is returned.

Bug fixes

Minor bug fixing for timeout-related methods (in some places boolean constants was used instead of method-supplied arguments)