
com.grahamedgecombe.db.BackoffStrategy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of db Show documentation
Show all versions of db Show documentation
A thin layer on top of the JDBC API that takes care of awkward boilerplate code.
The newest version!
package com.grahamedgecombe.db;
/**
* Represents a function for calculating the delay between transaction
* attempts.
* @author Graham Edgecombe
*/
@FunctionalInterface
public interface BackoffStrategy {
/**
* Calculates the delay between transaction attempts.
* @param attempt The zero-based attempt number.
* @throws IllegalArgumentException if {@code attempt} is negative.
* @return The delay in milliseconds.
*/
public int getDelay(int attempt);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy