Giter VIP home page Giter VIP logo

completable-future's Introduction

completable-future

Example how to use CompletableFuture

##Expected output

main-start::main
process::main
processInputParameter::ForkJoinPool.commonPool-worker-1, input param: InputParameter [amount=1, code=XPTO1, waitTimeoutSecs=5]
java.util.concurrent.CompletableFuture@682a0b20[Not completed]
main-send::main-InputParameter [amount=1, code=XPTO1, waitTimeoutSecs=5]
process::main
processInputParameter::ForkJoinPool.commonPool-worker-1 - sleeping 5000 ms.
processInputParameter::ForkJoinPool.commonPool-worker-2, input param: InputParameter [amount=0, code=XPTO2, waitTimeoutSecs=8]
processInputParameter::ForkJoinPool.commonPool-worker-2 - sleeping 8000 ms.
java.util.concurrent.CompletableFuture@3d075dc0[Not completed]
main-send::main-InputParameter [amount=0, code=XPTO2, waitTimeoutSecs=8]


processInputParameter::ForkJoinPool.commonPool-worker-1 - status::Result [status=SUCCESS, message=null]
exceptionally::ForkJoinPool.commonPool-worker-2 - status::Result [status=ERROR, message=java.lang.IllegalArgumentException: amount can't be zero]
main-end::main

completable-future's People

Contributors

sfragata avatar dependabot[bot] avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.