org.hibernate.boot.registry.selector.spi.DialectSelector Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hibernate-core-jakarta Show documentation
Show all versions of hibernate-core-jakarta Show documentation
Hibernate O/RM implementation of the Jakarta Persistence specification
The 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.boot.registry.selector.spi;
import java.util.Collection;
import java.util.concurrent.Callable;
import org.hibernate.boot.registry.selector.internal.LazyServiceResolver;
import org.hibernate.dialect.Dialect;
import org.hibernate.service.Service;
/**
* Service which acts as a registry for named strategy implementations.
*
* Strategies are more open ended than services, though a strategy managed here might very well also be a service. The
* strategy is any interface that has multiple, (possibly short) named implementations.
*
* StrategySelector manages resolution of particular implementation by (possibly short) name via the
* {@link #selectStrategyImplementor} method, which is the main contract here. As indicated in the docs of that
* method the given name might be either a short registered name or the implementation FQN. As an example, consider
* resolving the {@link org.hibernate.resource.transaction.spi.TransactionCoordinatorBuilder} implementation to use. To use the
* JDBC-based TransactionCoordinatorBuilder the passed name might be either {@code "jdbc"} or
* {@code "org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorBuilderImpl"} (which is the FQN).
*
* Strategy implementations can be managed by {@link #registerStrategyImplementor} and
* {@link #unRegisterStrategyImplementor}. Originally designed to help the OSGi use case, though no longer used there.
*
* The service also exposes a general typing API via {@link #resolveStrategy} and {@link #resolveDefaultableStrategy}
* which accept implementation references rather than implementation names, allowing for a multitude of interpretations
* of said "implementation reference". See the docs for {@link #resolveDefaultableStrategy} for details.
*
* @author Christian Beikov
*/
public interface DialectSelector extends Service, LazyServiceResolver {
}