Class RetryPolicy
java.lang.Object
cn.toint.oktool.model.RetryPolicy
-
Constructor Summary
ConstructorsConstructorDescriptionRetryPolicy(int retrySize, Duration intervalTime, Class<? extends Throwable> exceptionClass) RetryPolicy(int retrySize, Duration intervalTime, Class<? extends Throwable> exceptionClass, boolean printStackTrace) -
Method Summary
-
Constructor Details
-
RetryPolicy
-
RetryPolicy
public RetryPolicy(int retrySize, Duration intervalTime, Class<? extends Throwable> exceptionClass, boolean printStackTrace) - Parameters:
retrySize- 重试次数 (不包含首次执行, 小于1表示不重试, 但无论如何方法会执行1次)intervalTime- 间隔时间 (null 或 小于等于0, 表示立刻重试不会等待)exceptionClass- 匹配异常类型 (null 不会重试)printStackTrace- 重试时是否打印异常信息 (false 不打印)
-
-
Method Details
-
getRetrySize
public int getRetrySize() -
getIntervalTime
-
getExceptionClass
-
isPrintStackTrace
public boolean isPrintStackTrace() -
equals
-
hashCode
-
toString
-