Top Description Fields Constructors Methods
org.hibernate.boot.registry.internal

public Class BootstrapServiceRegistryImpl

extends Object
implements ServiceRegistryImplementor, BootstrapServiceRegistry, ServiceLifecycleOwner
Class Inheritance
All Implemented Interfaces
org.hibernate.service.spi.ServiceBinding.ServiceLifecycleOwner, org.hibernate.boot.registry.BootstrapServiceRegistry, org.hibernate.service.ServiceRegistry, java.lang.AutoCloseable, org.hibernate.service.spi.ServiceRegistryImplementor
Imports
java.util.HashSet, .LinkedHashSet, .Set, org.hibernate.boot.registry.BootstrapServiceRegistry, org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl, org.hibernate.boot.registry.classloading.spi.ClassLoaderService, org.hibernate.boot.registry.selector.internal.StrategySelectorImpl, org.hibernate.boot.registry.selector.spi.StrategySelector, org.hibernate.integrator.internal.IntegratorServiceImpl, org.hibernate.integrator.spi.Integrator, .IntegratorService, org.hibernate.internal.CoreLogging, .CoreMessageLogger, org.hibernate.service.Service, .ServiceRegistry, org.hibernate.service.spi.ServiceBinding, .ServiceException, .ServiceInitiator, .ServiceRegistryImplementor, .Stoppable

ServiceRegistry implementation containing specialized "bootstrap" services, specifically:
Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private boolean
private final boolean
private Set<ServiceRegistryImplementor>
private final ServiceBinding<ClassLoaderService>
private final ServiceBinding<IntegratorService>
private static final CoreMessageLogger
private static final LinkedHashSet<Integrator>
private final ServiceBinding<StrategySelector>

Constructor Summary

AccessConstructor and Description
public
BootstrapServiceRegistryImpl()

Constructs a BootstrapServiceRegistryImpl.

public
BootstrapServiceRegistryImpl(ClassLoaderService
The ClassLoaderService to use
classLoaderService
,
LinkedHashSet<Integrator>
The group of explicitly provided integrators
providedIntegrators
)

Constructs a BootstrapServiceRegistryImpl.

public
BootstrapServiceRegistryImpl(boolean autoCloseRegistry, ClassLoaderService
The ClassLoaderService to use
classLoaderService
,
LinkedHashSet<Integrator>
The group of explicitly provided integrators
providedIntegrators
)

Constructs a BootstrapServiceRegistryImpl.

public
BootstrapServiceRegistryImpl(ClassLoaderService
The ClassLoaderService to use
classLoaderService
,
StrategySelector
The StrategySelector to use
strategySelector
,
IntegratorService
The IntegratorService to use
integratorService
)

Constructs a BootstrapServiceRegistryImpl.

public
BootstrapServiceRegistryImpl(boolean autoCloseRegistry, ClassLoaderService
The ClassLoaderService to use
classLoaderService
,
StrategySelector
The StrategySelector to use
strategySelector
,
IntegratorService
The IntegratorService to use
integratorService
)

Constructs a BootstrapServiceRegistryImpl.

Method Summary

Modifier and TypeMethod and Description
public <R extends Service> void
public synchronized void
deRegisterChild(ServiceRegistryImplementor child)

Implements org.hibernate.service.spi.ServiceRegistryImplementor.deRegisterChild.

When a registry is created with a parent, the parent is notified of the child via this callback.
public synchronized void
private synchronized void
destroy(ServiceBinding<R extends Service> serviceBinding)

public ServiceRegistry
public <R extends Service> R
getService(Class<R>
The service role
serviceRole
)

Implements org.hibernate.service.ServiceRegistry.getService.

Retrieve a service by role.
public <R extends Service> R
public <R extends Service> void
public boolean
public <R extends Service> ServiceBinding<R>
locateServiceBinding(Class<R>
The service role for which to locate a binding.
serviceRole
)

Implements org.hibernate.service.spi.ServiceRegistryImplementor.locateServiceBinding.

Locate the binding for the given role.
public synchronized void
registerChild(ServiceRegistryImplementor child)

Implements org.hibernate.service.spi.ServiceRegistryImplementor.registerChild.

When a registry is created with a parent, the parent is notified of the child via this callback.
public <R extends Service> void
public synchronized <R extends Service> void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

activeback to summary
private boolean active
autoCloseRegistryback to summary
private final boolean autoCloseRegistry
childRegistriesback to summary
private Set<ServiceRegistryImplementor> childRegistries
classLoaderServiceBindingback to summary
private final ServiceBinding<ClassLoaderService> classLoaderServiceBinding
integratorServiceBindingback to summary
private final ServiceBinding<IntegratorService> integratorServiceBinding
LOGback to summary
private static final CoreMessageLogger LOG
NO_INTEGRATORSback to summary
private static final LinkedHashSet<Integrator> NO_INTEGRATORS
strategySelectorBindingback to summary
private final ServiceBinding<StrategySelector> strategySelectorBinding

Constructor Detail

BootstrapServiceRegistryImplback to summary
public BootstrapServiceRegistryImpl()

Constructs a BootstrapServiceRegistryImpl. Do not use directly generally speaking. Use org.hibernate.boot.registry.BootstrapServiceRegistryBuilder instead.

See Also
org.hibernate.boot.registry.BootstrapServiceRegistryBuilder
BootstrapServiceRegistryImplback to summary
public BootstrapServiceRegistryImpl(ClassLoaderService classLoaderService, LinkedHashSet<Integrator> providedIntegrators)

Constructs a BootstrapServiceRegistryImpl. Do not use directly generally speaking. Use org.hibernate.boot.registry.BootstrapServiceRegistryBuilder instead.

Parameters
classLoaderService:ClassLoaderService

The ClassLoaderService to use

providedIntegrators:LinkedHashSet<Integrator>

The group of explicitly provided integrators

See Also
org.hibernate.boot.registry.BootstrapServiceRegistryBuilder
BootstrapServiceRegistryImplback to summary
public BootstrapServiceRegistryImpl(boolean autoCloseRegistry, ClassLoaderService classLoaderService, LinkedHashSet<Integrator> providedIntegrators)

Constructs a BootstrapServiceRegistryImpl. Do not use directly generally speaking. Use org.hibernate.boot.registry.BootstrapServiceRegistryBuilder instead.

Parameters
autoCloseRegistry:boolean

See discussion on org.hibernate.boot.registry.BootstrapServiceRegistryBuilder#disableAutoClose

classLoaderService:ClassLoaderService

The ClassLoaderService to use

providedIntegrators:LinkedHashSet<Integrator>

The group of explicitly provided integrators

See Also
org.hibernate.boot.registry.BootstrapServiceRegistryBuilder
BootstrapServiceRegistryImplback to summary
public BootstrapServiceRegistryImpl(ClassLoaderService classLoaderService, StrategySelector strategySelector, IntegratorService integratorService)

Constructs a BootstrapServiceRegistryImpl. Do not use directly generally speaking. Use org.hibernate.boot.registry.BootstrapServiceRegistryBuilder instead.

Parameters
classLoaderService:ClassLoaderService

The ClassLoaderService to use

strategySelector:StrategySelector

The StrategySelector to use

integratorService:IntegratorService

The IntegratorService to use

See Also
org.hibernate.boot.registry.BootstrapServiceRegistryBuilder
BootstrapServiceRegistryImplback to summary
public BootstrapServiceRegistryImpl(boolean autoCloseRegistry, ClassLoaderService classLoaderService, StrategySelector strategySelector, IntegratorService integratorService)

Constructs a BootstrapServiceRegistryImpl. Do not use directly generally speaking. Use org.hibernate.boot.registry.BootstrapServiceRegistryBuilder instead.

Parameters
autoCloseRegistry:boolean

See discussion on org.hibernate.boot.registry.BootstrapServiceRegistryBuilder#disableAutoClose

classLoaderService:ClassLoaderService

The ClassLoaderService to use

strategySelector:StrategySelector

The StrategySelector to use

integratorService:IntegratorService

The IntegratorService to use

See Also
org.hibernate.boot.registry.BootstrapServiceRegistryBuilder

Method Detail

configureServiceback to summary
public <R extends Service> void configureService(ServiceBinding<R> binding)

Implements org.hibernate.service.spi.ServiceBinding.ServiceLifecycleOwner.configureService.

Annotations
@Override
deRegisterChildback to summary
public synchronized void deRegisterChild(ServiceRegistryImplementor child)

Implements org.hibernate.service.spi.ServiceRegistryImplementor.deRegisterChild.

Doc from org.hibernate.service.spi.ServiceRegistryImplementor.deRegisterChild.

When a registry is created with a parent, the parent is notified of the child via this callback.

Annotations
@Override
destroyback to summary
public synchronized void destroy()

Implements org.hibernate.service.spi.ServiceRegistryImplementor.destroy.

Doc from org.hibernate.service.spi.ServiceRegistryImplementor.destroy.

Release resources

Annotations
@Override
destroyback to summary
private synchronized void destroy(ServiceBinding<R extends Service> serviceBinding)
getParentServiceRegistryback to summary
public ServiceRegistry getParentServiceRegistry()

Implements org.hibernate.service.ServiceRegistry.getParentServiceRegistry.

Doc from org.hibernate.service.ServiceRegistry.getParentServiceRegistry.

Retrieve this registry's parent registry.

Returns:ServiceRegistry

The parent registry. May be null.

Annotations
@Override
getServiceback to summary
public <R extends Service> R getService(Class<R> serviceRole)

Implements org.hibernate.service.ServiceRegistry.getService.

Doc from org.hibernate.service.ServiceRegistry.getService.

Retrieve a service by role. If service is not found, but a org.hibernate.service.spi.ServiceInitiator is 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...

Parameters
<R>
The service role type
serviceRole:Class<R>

The service role

Returns:R

The requested service or null if the service was not found.

Annotations
@Override
initiateServiceback to summary
public <R extends Service> R initiateService(ServiceInitiator<R> serviceInitiator)

Implements org.hibernate.service.spi.ServiceBinding.ServiceLifecycleOwner.initiateService.

Annotations
@Override
injectDependenciesback to summary
public <R extends Service> void injectDependencies(ServiceBinding<R> binding)

Implements org.hibernate.service.spi.ServiceBinding.ServiceLifecycleOwner.injectDependencies.

Annotations
@Override
isActiveback to summary
public boolean isActive()
locateServiceBindingback to summary
public <R extends Service> ServiceBinding<R> locateServiceBinding(Class<R> serviceRole)

Implements org.hibernate.service.spi.ServiceRegistryImplementor.locateServiceBinding.

Doc from org.hibernate.service.spi.ServiceRegistryImplementor.locateServiceBinding.

Locate the binding for the given role. Should, generally speaking, look into parent registry if one.

Parameters
<R>
generic return type.
serviceRole:Class<R>

The service role for which to locate a binding.

Returns:ServiceBinding<R>

The located binding; may be null

Annotations
@Override
@SuppressWarnings:unchecked
registerChildback to summary
public synchronized void registerChild(ServiceRegistryImplementor child)

Implements org.hibernate.service.spi.ServiceRegistryImplementor.registerChild.

Doc from org.hibernate.service.spi.ServiceRegistryImplementor.registerChild.

When a registry is created with a parent, the parent is notified of the child via this callback.

Annotations
@Override
startServiceback to summary
public <R extends Service> void startService(ServiceBinding<R> binding)

Implements org.hibernate.service.spi.ServiceBinding.ServiceLifecycleOwner.startService.

Annotations
@Override
stopServiceback to summary
public synchronized <R extends Service> void stopService(ServiceBinding<R> binding)

Implements org.hibernate.service.spi.ServiceBinding.ServiceLifecycleOwner.stopService.

Annotations
@Override