public class BootstrapServiceRegistryBuilder extends Object
BootstrapServiceRegistry
instances. Provides registry for services needed for
most operations. This includes Integrator
handling and ClassLoader handling.
Additionally responsible for building and managing the StrategySelector
StandardServiceRegistryBuilder
Constructor and Description |
---|
BootstrapServiceRegistryBuilder() |
Modifier and Type | Method and Description |
---|---|
BootstrapServiceRegistryBuilder |
applyClassLoader(ClassLoader classLoader)
Adds a provided
ClassLoader for use in class-loading and resource-lookup. |
BootstrapServiceRegistryBuilder |
applyClassLoaderService(ClassLoaderService classLoaderService)
Adds a provided
ClassLoaderService for use in class-loading and resource-lookup. |
BootstrapServiceRegistryBuilder |
applyIntegrator(Integrator integrator)
Add an
Integrator to be applied to the bootstrap registry. |
<T> BootstrapServiceRegistryBuilder |
applyStrategySelector(Class<T> strategy,
String name,
Class<? extends T> implementation)
Applies a named strategy implementation to the bootstrap registry.
|
BootstrapServiceRegistryBuilder |
applyStrategySelectors(StrategyRegistrationProvider strategyRegistrationProvider)
Applies one or more strategy selectors announced as available by the passed announcer.
|
BootstrapServiceRegistry |
build()
Build the bootstrap registry.
|
static void |
destroy(ServiceRegistry serviceRegistry)
Destroy a service registry.
|
BootstrapServiceRegistryBuilder |
disableAutoClose()
By default, when a ServiceRegistry is no longer referenced by any other
registries as a parent it will be closed.
|
BootstrapServiceRegistryBuilder |
enableAutoClose()
See the discussion on
disableAutoClose() . |
BootstrapServiceRegistryBuilder |
with(ClassLoader classLoader)
Deprecated.
Use
applyClassLoader(java.lang.ClassLoader) instead |
BootstrapServiceRegistryBuilder |
with(ClassLoaderService classLoaderService)
Deprecated.
|
BootstrapServiceRegistryBuilder |
with(Integrator integrator)
Deprecated.
|
<T> BootstrapServiceRegistryBuilder |
withStrategySelector(Class<T> strategy,
String name,
Class<? extends T> implementation)
Deprecated.
|
BootstrapServiceRegistryBuilder |
withStrategySelectors(StrategyRegistrationProvider strategyRegistrationProvider)
Deprecated.
|
@Deprecated public BootstrapServiceRegistryBuilder with(Integrator integrator)
applyIntegrator(org.hibernate.integrator.spi.Integrator)
insteadpublic BootstrapServiceRegistryBuilder applyIntegrator(Integrator integrator)
Integrator
to be applied to the bootstrap registry.integrator
- The integrator to add.this
, for method chaining@Deprecated public BootstrapServiceRegistryBuilder with(ClassLoader classLoader)
applyClassLoader(java.lang.ClassLoader)
insteadpublic BootstrapServiceRegistryBuilder applyClassLoader(ClassLoader classLoader)
ClassLoader
for use in class-loading and resource-lookup.classLoader
- The class loader to usethis
, for method chaining@Deprecated public BootstrapServiceRegistryBuilder with(ClassLoaderService classLoaderService)
applyClassLoaderService(org.hibernate.boot.registry.classloading.spi.ClassLoaderService)
insteadpublic BootstrapServiceRegistryBuilder applyClassLoaderService(ClassLoaderService classLoaderService)
ClassLoaderService
for use in class-loading and resource-lookup.classLoaderService
- The class loader service to usethis
, for method chaining@Deprecated public <T> BootstrapServiceRegistryBuilder withStrategySelector(Class<T> strategy, String name, Class<? extends T> implementation)
applyStrategySelector(java.lang.Class<T>, java.lang.String, java.lang.Class<? extends T>)
insteadpublic <T> BootstrapServiceRegistryBuilder applyStrategySelector(Class<T> strategy, String name, Class<? extends T> implementation)
T
- Defines the strategy type and makes sure that the strategy and implementation are of
compatible types.strategy
- The strategyname
- The registered nameimplementation
- The strategy implementation Classthis
, for method chainingStrategySelector.registerStrategyImplementor(Class, String, Class)
@Deprecated public BootstrapServiceRegistryBuilder withStrategySelectors(StrategyRegistrationProvider strategyRegistrationProvider)
applyStrategySelectors(org.hibernate.boot.registry.selector.StrategyRegistrationProvider)
insteadpublic BootstrapServiceRegistryBuilder applyStrategySelectors(StrategyRegistrationProvider strategyRegistrationProvider)
strategyRegistrationProvider
- An provider for one or more available selectorsthis
, for method chainingStrategySelector.registerStrategyImplementor(Class, String, Class)
public BootstrapServiceRegistryBuilder disableAutoClose()
public BootstrapServiceRegistryBuilder enableAutoClose()
disableAutoClose()
. This method enables
the auto-closing.public BootstrapServiceRegistry build()
public static void destroy(ServiceRegistry serviceRegistry)
serviceRegistry
- The registry to be closed.Copyright © 2016 JBoss by Red Hat. All rights reserved.