All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.grahamedgecombe.db.BackoffStrategy Maven / Gradle / Ivy

Go to download

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