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

org.kernelab.basis.sql.ConnectionProvider Maven / Gradle / Ivy

There is a newer version: 0.0.19-RELEASE
Show newest version
package org.kernelab.basis.sql;

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

public interface ConnectionProvider
{
	/**
	 * Check the given Connection is valid or not.
	 * 
	 * @param element
	 *            the given Connection to be checked.
	 * @return true if and only if the given Connection is valid.
	 */
	public boolean isValid(Connection conn);

	/**
	 * To provide a valid Connection.
	 * 
	 * @param timeout
	 *            The maximum milliseconds to be waited, 0 means always wait
	 *            until an available Connection is returned.
	 * @return
	 * @throws Exception
	 */
	public Connection provideConnection(long timeout) throws SQLException;
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy