类 BootstrapServiceRegistryImpl
- java.lang.Object
-
- org.hibernate.boot.registry.internal.BootstrapServiceRegistryImpl
-
- 所有已实现的接口:
AutoCloseable,BootstrapServiceRegistry,ServiceRegistry,ServiceBinding.ServiceLifecycleOwner,ServiceRegistryImplementor
public class BootstrapServiceRegistryImpl extends Object implements ServiceRegistryImplementor, BootstrapServiceRegistry, ServiceBinding.ServiceLifecycleOwner
ServiceRegistryimplementation containing specialized "bootstrap" services, specifically:- 作者:
- Steve Ebersole
-
-
构造器概要
构造器 构造器 说明 BootstrapServiceRegistryImpl()Constructs a BootstrapServiceRegistryImpl.BootstrapServiceRegistryImpl(boolean autoCloseRegistry, ClassLoaderService classLoaderService, LinkedHashSet<Integrator> providedIntegrators)Constructs a BootstrapServiceRegistryImpl.BootstrapServiceRegistryImpl(boolean autoCloseRegistry, ClassLoaderService classLoaderService, StrategySelector strategySelector, IntegratorService integratorService)Constructs a BootstrapServiceRegistryImpl.BootstrapServiceRegistryImpl(ClassLoaderService classLoaderService, LinkedHashSet<Integrator> providedIntegrators)Constructs a BootstrapServiceRegistryImpl.BootstrapServiceRegistryImpl(ClassLoaderService classLoaderService, StrategySelector strategySelector, IntegratorService integratorService)Constructs a BootstrapServiceRegistryImpl.
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 <R extends Service>
voidconfigureService(ServiceBinding<R> binding)voiddeRegisterChild(ServiceRegistryImplementor child)When a registry is created with a parent, the parent is notified of the child via this callback.voiddestroy()Release resourcesServiceRegistrygetParentServiceRegistry()Retrieve this registry's parent registry.<R extends Service>
RgetService(Class<R> serviceRole)Retrieve a service by role.<R extends Service>
RinitiateService(ServiceInitiator<R> serviceInitiator)<R extends Service>
voidinjectDependencies(ServiceBinding<R> binding)booleanisActive()<R extends Service>
ServiceBinding<R>locateServiceBinding(Class<R> serviceRole)Locate the binding for the given role.voidregisterChild(ServiceRegistryImplementor child)When a registry is created with a parent, the parent is notified of the child via this callback.<R extends Service>
voidstartService(ServiceBinding<R> binding)<R extends Service>
voidstopService(ServiceBinding<R> binding)-
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
从接口继承的方法 org.hibernate.service.ServiceRegistry
requireService
-
从接口继承的方法 org.hibernate.service.spi.ServiceRegistryImplementor
close
-
-
-
-
构造器详细资料
-
BootstrapServiceRegistryImpl
public BootstrapServiceRegistryImpl()
Constructs a BootstrapServiceRegistryImpl. Do not use directly generally speaking. UseBootstrapServiceRegistryBuilderinstead.
-
BootstrapServiceRegistryImpl
public BootstrapServiceRegistryImpl(ClassLoaderService classLoaderService, LinkedHashSet<Integrator> providedIntegrators)
Constructs a BootstrapServiceRegistryImpl. Do not use directly generally speaking. UseBootstrapServiceRegistryBuilderinstead.- 参数:
classLoaderService- The ClassLoaderService to useprovidedIntegrators- The group of explicitly provided integrators- 另请参阅:
BootstrapServiceRegistryBuilder
-
BootstrapServiceRegistryImpl
public BootstrapServiceRegistryImpl(boolean autoCloseRegistry, ClassLoaderService classLoaderService, LinkedHashSet<Integrator> providedIntegrators)Constructs a BootstrapServiceRegistryImpl. Do not use directly generally speaking. UseBootstrapServiceRegistryBuilderinstead.- 参数:
autoCloseRegistry- See discussion onBootstrapServiceRegistryBuilder.disableAutoClose()classLoaderService- The ClassLoaderService to useprovidedIntegrators- The group of explicitly provided integrators- 另请参阅:
BootstrapServiceRegistryBuilder
-
BootstrapServiceRegistryImpl
public BootstrapServiceRegistryImpl(ClassLoaderService classLoaderService, StrategySelector strategySelector, IntegratorService integratorService)
Constructs a BootstrapServiceRegistryImpl. Do not use directly generally speaking. UseBootstrapServiceRegistryBuilderinstead.- 参数:
classLoaderService- The ClassLoaderService to usestrategySelector- The StrategySelector to useintegratorService- The IntegratorService to use- 另请参阅:
BootstrapServiceRegistryBuilder
-
BootstrapServiceRegistryImpl
public BootstrapServiceRegistryImpl(boolean autoCloseRegistry, ClassLoaderService classLoaderService, StrategySelector strategySelector, IntegratorService integratorService)Constructs a BootstrapServiceRegistryImpl. Do not use directly generally speaking. UseBootstrapServiceRegistryBuilderinstead.- 参数:
autoCloseRegistry- See discussion onBootstrapServiceRegistryBuilder.disableAutoClose()classLoaderService- The ClassLoaderService to usestrategySelector- The StrategySelector to useintegratorService- The IntegratorService to use- 另请参阅:
BootstrapServiceRegistryBuilder
-
-
方法详细资料
-
getService
public <R extends Service> R getService(Class<R> serviceRole)
从接口复制的说明:ServiceRegistryRetrieve a service by role. If service is not found, but aServiceInitiatoris registered for this service role, the service will be initialized and returned. NOTE: We cannot return<R extends Service<T>>here because the service might come from the parent...- 指定者:
getService在接口中ServiceRegistry- 类型参数:
R- The service role type- 参数:
serviceRole- The service role- 返回:
- The requested service or null if the service was not found.
-
locateServiceBinding
public <R extends Service> ServiceBinding<R> locateServiceBinding(Class<R> serviceRole)
从接口复制的说明:ServiceRegistryImplementorLocate the binding for the given role. Should, generally speaking, look into parent registry if one.- 指定者:
locateServiceBinding在接口中ServiceRegistryImplementor- 类型参数:
R- generic return type.- 参数:
serviceRole- The service role for which to locate a binding.- 返回:
- The located binding; may be
null
-
destroy
public void destroy()
从接口复制的说明:ServiceRegistryImplementorRelease resources- 指定者:
destroy在接口中ServiceRegistryImplementor
-
isActive
public boolean isActive()
-
getParentServiceRegistry
public ServiceRegistry getParentServiceRegistry()
从接口复制的说明:ServiceRegistryRetrieve this registry's parent registry.- 指定者:
getParentServiceRegistry在接口中ServiceRegistry- 返回:
- The parent registry. May be null.
-
initiateService
public <R extends Service> R initiateService(ServiceInitiator<R> serviceInitiator)
-
configureService
public <R extends Service> void configureService(ServiceBinding<R> binding)
-
injectDependencies
public <R extends Service> void injectDependencies(ServiceBinding<R> binding)
-
startService
public <R extends Service> void startService(ServiceBinding<R> binding)
-
stopService
public <R extends Service> void stopService(ServiceBinding<R> binding)
-
registerChild
public void registerChild(ServiceRegistryImplementor child)
从接口复制的说明:ServiceRegistryImplementorWhen a registry is created with a parent, the parent is notified of the child via this callback.- 指定者:
registerChild在接口中ServiceRegistryImplementor
-
deRegisterChild
public void deRegisterChild(ServiceRegistryImplementor child)
从接口复制的说明:ServiceRegistryImplementorWhen a registry is created with a parent, the parent is notified of the child via this callback.- 指定者:
deRegisterChild在接口中ServiceRegistryImplementor
-
-