All Projects → houbb → sisyphus

houbb / sisyphus

Licence: Apache-2.0 License
The java retry framework.(支持注解的 java 重试框架)

Programming Languages

java
68154 projects - #9 most used programming language
shell
77523 projects
Batchfile
5799 projects

Projects that are alternatives of or similar to sisyphus

java-retrying
java retry module, based on guava-retrying, support sync/async retry
Stars: ✭ 19 (-84.92%)
Mutual labels:  retry, java-retry
backoff
PHP library providing retry functionality with multiple backoff strategies and jitter support
Stars: ✭ 132 (+4.76%)
Mutual labels:  retry
Afnetworking Retrypolicy
Nice category that adds the ability to set the retry interval, retry count and progressiveness.
Stars: ✭ 197 (+56.35%)
Mutual labels:  retry
php-backoff
Simple back off / retry functionality
Stars: ✭ 24 (-80.95%)
Mutual labels:  retry
Toxy
Hackable HTTP proxy for resiliency testing and simulated network conditions
Stars: ✭ 2,698 (+2041.27%)
Mutual labels:  retry
java-sdk
一些常用的java sdk和工具类(日期工具类,分布式锁,redis缓存,二叉树,反射工具类,线程池,对称/非对称/分段加解密,json序列化,http工具,雪花算法,字符串相似度,集合操作工具,xml解析,重试Retry工具类,Jvm监控等)
Stars: ✭ 26 (-79.37%)
Mutual labels:  retry
Loadmorewrapper
📦 make recyclerView supports load more and customize the footer view, without changes to the original adater of recyclerView. 在不改动 RecyclerView 原有的 adapter 的情况下,使 RecyclerView 滑动到底部的时候能够加载更多和自定义底部视图。
Stars: ✭ 179 (+42.06%)
Mutual labels:  retry
resilience4clj-circuitbreaker
Resilience4Clj circuit breaker lets you decorate a function call (usually with a potential of external failure) with a safety mechanism to interrupt the propagation of failures.
Stars: ✭ 40 (-68.25%)
Mutual labels:  retry
HTMLTestRunner cn
HTMLTestRunner 汉化版,同时支持python 2和3,增加截图展示功能,失败重试
Stars: ✭ 191 (+51.59%)
Mutual labels:  retry
jest-retry
Jest retry pattern for flaky E2E tests
Stars: ✭ 36 (-71.43%)
Mutual labels:  retry
request-on-steroids
An HTTP client ✨ with retry, circuit-breaker and tor support 📦 out-of-the-box
Stars: ✭ 19 (-84.92%)
Mutual labels:  retry
esa-httpclient
An asynchronous event-driven HTTP client based on netty.
Stars: ✭ 82 (-34.92%)
Mutual labels:  retry
retrygroup
Package retrygroup provides synchronization, Context cancelation for groups of retry goroutines working on subtasks of a common task.
Stars: ✭ 18 (-85.71%)
Mutual labels:  retry
Mug
A small Java 8 util library, complementary to Guava (BiStream, Substring, MoreStreams, Parallelizer).
Stars: ✭ 236 (+87.3%)
Mutual labels:  retry
retry
Simple and easy retry mechanism package for Go
Stars: ✭ 54 (-57.14%)
Mutual labels:  retry
Retry4j
Lightweight Java library for retrying unreliable logic
Stars: ✭ 179 (+42.06%)
Mutual labels:  retry
View-Load-ReTry
这个加载框架有点不一样,针对View进行加载,加载页面还保持了原View的属性,侧重点在灵活,哪里需要加载哪里,加载状态页面完全自定义,无任何限制,针对加载结果可以按需配置对应页面,LeakCanary检测无内存泄漏
Stars: ✭ 116 (-7.94%)
Mutual labels:  retry
typescript-retry-decorator
lightweight typescript retry decorator with 0 dependency.
Stars: ✭ 50 (-60.32%)
Mutual labels:  retry
perseverance
Make your functions 💪 resilient and 🚥 fail-fast to 💩 failures or ⌚ delays
Stars: ✭ 12 (-90.48%)
Mutual labels:  retry
re-retrying
A Java library to allow for the creation of configurable retrying strategies for an arbitrary function call, such as something that communicates with a remote service with flaky uptime.
Stars: ✭ 36 (-71.43%)
Mutual labels:  retry

Sisyphus

Sisyphus 是支持过程式编程和注解编程的 java 重试框架。

Build Status Maven Central Open Source Love

sisyphus.jpg

特性

  • 支持 fluent 过程式编程

  • 基于字节码的代理重试

  • 基于注解的重试,允许自定义注解

  • 无缝接入 spring

  • 无缝接入 spring-boot

  • 接口与注解的统一

  • 解决 spring-retry 与 guava-retrying 中的不足之处

v0.1.0 变更

  • Recover 上下文增加入参,更加便于业务处理

更新记录

更新记录

设计目的

综合了 spring-retry 和 gauva-retrying 的优势。

调整一些特性,使其更利于实际使用。

采用 Netty 类似的接口思想,保证接口的一致性,和替换的灵活性。

借鉴 Hibernate-Validator 的设计,允许用户自定义注解。

spring-retry 与 guava-retrying 中的不足之处

开源地址

sisyphus

快速开始

引入

<plugin>
    <groupId>com.github.houbb</groupId>
    <artifactId>sisyphus-core</artifactId>
    <version>0.1.0</version>
</plugin>

入门代码

详情参见 RetryerTest

public void helloTest() {
    Retryer.<String>newInstance()
                .callable(new Callable<String>() {
                    @Override
                    public String call() throws Exception {
                        System.out.println("called...");
                        return null;
                    }
                }).retryCall();
}

代码分析

  • callable

指定一个 callable 的实现。

我们打印一条日志,并且模拟一个程序异常。

日志信息

日志信息

called...
called...
called...

和一些其他异常信息。

重试触发的条件,默认是程序发生了异常

这里的重试间隔默认为没有时间间隔,一共尝试3次。(包括第一次程序本身执行)

拓展阅读

00-sisyphus 是什么

01-为什么选择 sisyphus

02-sisyphus 模块简介

03-sisyphus 快速开始

04-sisyphus 配置概览

05-sisyphus 注解简介

06-sisyphus 代理模板

07-sisyphus spring 整合

08-sisyphus springboot 整合

后期 Road-MAP

  • 丰富上下文信息

  • 丰富重试统计信息

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].