io.hypersistence.utils.spring.annotation.Retry Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hypersistence-utils-hibernate-55 Show documentation
Show all versions of hypersistence-utils-hibernate-55 Show documentation
Utilities for Spring and Hibernate ORM 5.5 to 5.6
package io.hypersistence.utils.spring.annotation;
import java.lang.annotation.*;
/**
* The Retry annotation instructs Spring to retry
* a method execution when catching a given {@link Throwable}.
*
* @author Vlad Mihalcea
* @since 3.1.0
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
@Inherited
public @interface Retry {
/**
* Declare the throwable types the retry will be executed for.
*
* @return throwable types triggering a retry
*/
Class extends Throwable>[] on();
/**
* The number of retry attempts
*
* @return retry attempts
*/
int times() default 1;
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy