Coder Social home page Coder Social logo

rnorth / duct-tape Goto Github PK

View Code? Open in Web Editor NEW
89.0 89.0 11.0 829 KB

A little Java 8 library providing an implementation of the Circuit Breaker pattern. It provides fault tolerant wrappers for code that calls external APIs and unreliable components, including those that may fail, time out, or return inconsistent results.

License: MIT License

Java 100.00%

duct-tape's People

Contributors

arnzel avatar bsideup avatar greenbird-chr avatar rnorth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

duct-tape's Issues

Unreliables, custom exception handler.

If an exception is thrown in
public static <T> T retryUntilSuccess(final int timeout, @NotNull final TimeUnit timeUnit, @NotNull final Callable<T> lambda)
it will be wrapped into a TimeoutException.

It might be necessary in some cases to abort execution immediately on some exception, which is not possible at the moment.
One possible solution is to add an optional exception handler argument - Consumer<Exception> handler, that would just rethrow the exception here:

try {
                        return lambda.call();
                    } catch (Exception e) {
                        // Failed
                        LOGGER.trace("Retrying lambda call on attempt {}", attempt[0]++);
                        lastException[0] = e;
                    }

Remove hard dependency to org.jetbrains:annotations

Hello!

Would it be possible to mark the dependency to org.jetbrains:annotations as provided or optional?

We had trouble upgrading to the latest Testcontainers release because the very popular org.jetbrains.kotlin:kotlin-stdlib also depends on it, leading to various modules to fail the build becuse of dependency convergence problems.

I can of course exclude it so it's not big deal, but I'm reporting it as it might be just easier for all Testcontainer users if this wasn't pulled in.

Thanks

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.