Class StandardServiceRegistryImpl
- java.lang.Object
-
- org.hibernate.service.internal.AbstractServiceRegistryImpl
-
- org.hibernate.boot.registry.internal.StandardServiceRegistryImpl
-
- All Implemented Interfaces:
AutoCloseable
,StandardServiceRegistry
,ServiceRegistry
,ServiceBinding.ServiceLifecycleOwner
,ServiceRegistryImplementor
- Direct Known Subclasses:
ServiceRegistryTestingImpl
public class StandardServiceRegistryImpl extends AbstractServiceRegistryImpl implements StandardServiceRegistry
Standard Hibernate implementation of the standard service registry.
-
-
Field Summary
-
Fields inherited from class org.hibernate.service.internal.AbstractServiceRegistryImpl
ALLOW_CRAWLING
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
StandardServiceRegistryImpl(boolean autoCloseRegistry, BootstrapServiceRegistry bootstrapServiceRegistry, Map<String,Object> configurationValues)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
applyServiceRegistrations(List<StandardServiceInitiator<?>> serviceInitiators, List<ProvidedService<?>> providedServices)
<R extends Service>
voidconfigureService(ServiceBinding<R> serviceBinding)
static StandardServiceRegistryImpl
create(boolean autoCloseRegistry, BootstrapServiceRegistry bootstrapServiceRegistry, List<StandardServiceInitiator<?>> serviceInitiators, List<ProvidedService<?>> providedServices, Map<String,Object> configurationValues)
Constructs a StandardServiceRegistryImpl.static StandardServiceRegistryImpl
create(BootstrapServiceRegistry bootstrapServiceRegistry, List<StandardServiceInitiator<?>> serviceInitiators, List<ProvidedService<?>> providedServices, Map<String,Object> configurationValues)
Constructs a StandardServiceRegistryImpl.void
destroy()
Release resources<R extends Service>
RinitiateService(ServiceInitiator<R> serviceInitiator)
void
resetAndReactivate(BootstrapServiceRegistry bootstrapServiceRegistry, List<StandardServiceInitiator<?>> serviceInitiators, List<ProvidedService<?>> providedServices, Map<?,?> configurationValues)
Not intended for general use.-
Methods inherited from class org.hibernate.service.internal.AbstractServiceRegistryImpl
createService, createServiceBinding, createServiceBinding, deRegisterChild, fromRegistryOrChildren, fromRegistryOrChildren, getParentServiceRegistry, getService, initialize, injectDependencies, isActive, locateServiceBinding, locateServiceBinding, reactivate, registerChild, registerService, resetParent, startService, stopService, visitServiceBindings
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.service.ServiceRegistry
getParentServiceRegistry, getService, requireService
-
Methods inherited from interface org.hibernate.service.spi.ServiceRegistryImplementor
close
-
-
-
-
Constructor Detail
-
StandardServiceRegistryImpl
protected StandardServiceRegistryImpl(boolean autoCloseRegistry, BootstrapServiceRegistry bootstrapServiceRegistry, Map<String,Object> configurationValues)
-
-
Method Detail
-
create
public static StandardServiceRegistryImpl create(BootstrapServiceRegistry bootstrapServiceRegistry, List<StandardServiceInitiator<?>> serviceInitiators, List<ProvidedService<?>> providedServices, Map<String,Object> configurationValues)
Constructs a StandardServiceRegistryImpl. Should not be instantiated directly; useStandardServiceRegistryBuilder
instead- Parameters:
bootstrapServiceRegistry
- The bootstrap service registry.serviceInitiators
- Any StandardServiceInitiators provided by the user to the builderprovidedServices
- Any standard services provided directly to the builderconfigurationValues
- Configuration values- See Also:
StandardServiceRegistryBuilder
-
create
public static StandardServiceRegistryImpl create(boolean autoCloseRegistry, BootstrapServiceRegistry bootstrapServiceRegistry, List<StandardServiceInitiator<?>> serviceInitiators, List<ProvidedService<?>> providedServices, Map<String,Object> configurationValues)
Constructs a StandardServiceRegistryImpl. Should not be instantiated directly; useStandardServiceRegistryBuilder
instead- Parameters:
autoCloseRegistry
- See discussion onStandardServiceRegistryBuilder.disableAutoClose()
bootstrapServiceRegistry
- The bootstrap service registry.serviceInitiators
- Any StandardServiceInitiators provided by the user to the builderprovidedServices
- Any standard services provided directly to the builderconfigurationValues
- Configuration values- See Also:
StandardServiceRegistryBuilder
-
applyServiceRegistrations
protected void applyServiceRegistrations(List<StandardServiceInitiator<?>> serviceInitiators, List<ProvidedService<?>> providedServices)
-
resetAndReactivate
public void resetAndReactivate(BootstrapServiceRegistry bootstrapServiceRegistry, List<StandardServiceInitiator<?>> serviceInitiators, List<ProvidedService<?>> providedServices, Map<?,?> configurationValues)
Not intended for general use. We need the ability to stop and "reactivate" a registry to allow experimentation with technologies such as GraalVM, Quarkus and Cri-O.
-
initiateService
public <R extends Service> R initiateService(ServiceInitiator<R> serviceInitiator)
- Specified by:
initiateService
in interfaceServiceBinding.ServiceLifecycleOwner
-
configureService
public <R extends Service> void configureService(ServiceBinding<R> serviceBinding)
- Specified by:
configureService
in interfaceServiceBinding.ServiceLifecycleOwner
-
destroy
public void destroy()
Description copied from interface:ServiceRegistryImplementor
Release resources- Specified by:
destroy
in interfaceServiceRegistryImplementor
- Overrides:
destroy
in classAbstractServiceRegistryImpl
-
-