Interface DialectSelector
-
- All Superinterfaces:
LazyServiceResolver<Dialect>
,Serializable
,Service
- All Known Implementing Classes:
AggregatedDialectSelector
,DefaultDialectSelector
public interface DialectSelector extends Service, LazyServiceResolver<Dialect>
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
StrategySelector.selectStrategyImplementor(java.lang.Class<T>, java.lang.String)
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 theTransactionCoordinatorBuilder
implementation to use. To use the JDBC-based TransactionCoordinatorBuilder the passed name might be either"jdbc"
or"org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorBuilderImpl"
(which is the FQN).Strategy implementations can be managed by
StrategySelector.registerStrategyImplementor(java.lang.Class<T>, java.lang.String, java.lang.Class<? extends T>)
andStrategySelector.unRegisterStrategyImplementor(java.lang.Class<T>, java.lang.Class<? extends T>)
. Originally designed to help the OSGi use case, though no longer used there.The service also exposes a general typing API via
StrategySelector.resolveStrategy(java.lang.Class<T>, java.lang.Object)
andStrategySelector.resolveDefaultableStrategy(java.lang.Class<T>, java.lang.Object, T)
which accept implementation references rather than implementation names, allowing for a multitude of interpretations of said "implementation reference". See the docs forStrategySelector.resolveDefaultableStrategy(java.lang.Class<T>, java.lang.Object, T)
for details.
-
-
Method Summary
-
Methods inherited from interface org.hibernate.boot.registry.selector.internal.LazyServiceResolver
resolve
-
-