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

com.github.rbuck.retry.SqlCallable Maven / Gradle / Ivy

Go to download

Lets developers make their applications more resilient by adding robust transient fault handling logic. Transient faults are errors that occur because of some temporary condition such as network connectivity issues or service unavailability. Typically, if you retry the operation that resulted in a transient error a short time later, you find that the error has disappeared.

There is a newer version: 1.2
Show newest version
package com.github.rbuck.retry;

import java.sql.Connection;
import java.sql.SQLException;

/**
 * A SAM type permitting the use of lambda expressions whose default action is
 * to perform a SQL transaction using the given connection.
 *
 * @author Robert Buck ([email protected])
 */
public interface SqlCallable {

    /**
     * Implementation for the action to perform.
     *
     * @param connection the connection against which to perform the action
     * @return the result of the transaction
     * @throws java.sql.SQLException throw with detail related to cause; callers should
     *                               retry if the exception type is
     *                               {@link java.sql.SQLTransientException}.
     */
    V call(Connection connection) throws SQLException;

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy