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

org.hibernate.resource.transaction.spi.DdlTransactionIsolator Maven / Gradle / Ivy

There is a newer version: 7.0.0.Alpha1
Show newest version
/*
 * Hibernate, Relational Persistence for Idiomatic Java
 *
 * License: GNU Lesser General Public License (LGPL), version 2.1 or later.
 * See the lgpl.txt file in the root directory or .
 */
package org.hibernate.resource.transaction.spi;

import java.sql.Connection;

import org.hibernate.tool.schema.internal.exec.JdbcContext;

/**
 * Provides access to a Connection that is isolated from
 * any "current transaction" with the designed purpose of
 * performing DDL commands
 *
 * @author Steve Ebersole
 */
public interface DdlTransactionIsolator {
	JdbcContext getJdbcContext();

	/**
	 * In general a DdlTransactionIsolator should be returned from
	 * {@link TransactionCoordinatorBuilder#buildDdlTransactionIsolator}
	 * already prepared for use (until {@link #release} is called).
	 *
	 * @deprecated Instances should be returned from
	 * {@link TransactionCoordinatorBuilder#buildDdlTransactionIsolator}
	 * already prepared for use
	 */
	@Deprecated
	void prepare();

	/**
	 * Returns a Connection that is usable within the bounds of the
	 * {@link #prepare} and {@link #release} calls.  Further, this
	 * Connection will be isolated (transactionally) from any
	 * transaction in effect prior to the call to {@link #prepare}.
	 *
	 * @return
	 */
	Connection getIsolatedConnection();

	void release();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy