Class RecordableBootstrap


  • public final class RecordableBootstrap
    extends org.hibernate.boot.registry.StandardServiceRegistryBuilder
    Has to extend StandardServiceRegistryBuilder even if we don't want: needs to be assignable to it.
    • Field Summary

      • Fields inherited from class org.hibernate.boot.registry.StandardServiceRegistryBuilder

        DEFAULT_CFG_RESOURCE_NAME
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      org.hibernate.boot.registry.StandardServiceRegistryBuilder addInitiator​(org.hibernate.boot.registry.StandardServiceInitiator<?> initiator)
      Adds a service initiator.
      <T extends org.hibernate.service.Service>
      org.hibernate.boot.registry.StandardServiceRegistryBuilder
      addService​(Class<T> serviceRole, T service)
      Adds a user-provided service.
      org.hibernate.boot.registry.StandardServiceRegistryBuilder applySetting​(String settingName, Object value)
      Apply a setting value.
      org.hibernate.boot.registry.StandardServiceRegistryBuilder applySettings​(Map<String,​Object> settings)
      Apply a groups of setting values.
      org.hibernate.boot.registry.StandardServiceRegistry build()
      Build the StandardServiceRegistry.
      void clearSettings()  
      org.hibernate.boot.registry.StandardServiceRegistryBuilder configure()
      Read setting information from an XML file using the standard resource location.
      org.hibernate.boot.registry.StandardServiceRegistryBuilder configure​(File configurationFile)  
      org.hibernate.boot.registry.StandardServiceRegistryBuilder configure​(String resourceName)  
      org.hibernate.boot.registry.StandardServiceRegistryBuilder configure​(URL url)  
      org.hibernate.boot.registry.StandardServiceRegistryBuilder configure​(org.hibernate.boot.cfgxml.spi.LoadedConfig loadedConfig)  
      static void destroy​(org.hibernate.service.ServiceRegistry serviceRegistry)
      Destroy a service registry.
      org.hibernate.boot.registry.StandardServiceRegistryBuilder disableAutoClose()
      By default, when a ServiceRegistry is no longer referenced by any other registries as a parent it will be closed.
      org.hibernate.boot.registry.StandardServiceRegistryBuilder enableAutoClose()
      See the discussion on disableAutoClose().
      org.hibernate.boot.cfgxml.spi.LoadedConfig getAggregatedCfgXml()
      Intended for internal testing use only!!
      org.hibernate.boot.registry.BootstrapServiceRegistry getBootstrapServiceRegistry()  
      List<Class<? extends org.hibernate.service.Service>> getPostBuildProvidedServices()  
      List<org.hibernate.service.internal.ProvidedService<?>> getProvidedServices()  
      Map<String,​Object> getSettings()
      Deprecated.
      Temporarily exposed since Configuration is still around and much code still uses Configuration.
      org.hibernate.boot.registry.StandardServiceRegistryBuilder loadProperties​(File file)  
      org.hibernate.boot.registry.StandardServiceRegistryBuilder loadProperties​(String resourceName)  
      • Methods inherited from class org.hibernate.boot.registry.StandardServiceRegistryBuilder

        applySettings, forJpa, getConfigLoader
    • Constructor Detail

      • RecordableBootstrap

        public RecordableBootstrap​(org.hibernate.boot.registry.BootstrapServiceRegistry bootstrapServiceRegistry,
                                   InitialInitiatorListProvider initialInitiatorsProvider)
    • Method Detail

      • getAggregatedCfgXml

        public org.hibernate.boot.cfgxml.spi.LoadedConfig getAggregatedCfgXml()
        Intended for internal testing use only!!
        Overrides:
        getAggregatedCfgXml in class org.hibernate.boot.registry.StandardServiceRegistryBuilder
      • getBootstrapServiceRegistry

        public org.hibernate.boot.registry.BootstrapServiceRegistry getBootstrapServiceRegistry()
        Overrides:
        getBootstrapServiceRegistry in class org.hibernate.boot.registry.StandardServiceRegistryBuilder
      • loadProperties

        public org.hibernate.boot.registry.StandardServiceRegistryBuilder loadProperties​(String resourceName)
        Overrides:
        loadProperties in class org.hibernate.boot.registry.StandardServiceRegistryBuilder
      • loadProperties

        public org.hibernate.boot.registry.StandardServiceRegistryBuilder loadProperties​(File file)
        Overrides:
        loadProperties in class org.hibernate.boot.registry.StandardServiceRegistryBuilder
      • configure

        public org.hibernate.boot.registry.StandardServiceRegistryBuilder configure()
        Read setting information from an XML file using the standard resource location.
        Overrides:
        configure in class org.hibernate.boot.registry.StandardServiceRegistryBuilder
        Returns:
        this, for method chaining
        See Also:
        StandardServiceRegistryBuilder.DEFAULT_CFG_RESOURCE_NAME, configure(String), loadProperties(String)
      • configure

        public org.hibernate.boot.registry.StandardServiceRegistryBuilder configure​(String resourceName)
        Overrides:
        configure in class org.hibernate.boot.registry.StandardServiceRegistryBuilder
      • configure

        public org.hibernate.boot.registry.StandardServiceRegistryBuilder configure​(File configurationFile)
        Overrides:
        configure in class org.hibernate.boot.registry.StandardServiceRegistryBuilder
      • configure

        public org.hibernate.boot.registry.StandardServiceRegistryBuilder configure​(URL url)
        Overrides:
        configure in class org.hibernate.boot.registry.StandardServiceRegistryBuilder
      • configure

        public org.hibernate.boot.registry.StandardServiceRegistryBuilder configure​(org.hibernate.boot.cfgxml.spi.LoadedConfig loadedConfig)
        Overrides:
        configure in class org.hibernate.boot.registry.StandardServiceRegistryBuilder
      • applySetting

        public org.hibernate.boot.registry.StandardServiceRegistryBuilder applySetting​(String settingName,
                                                                                       Object value)
        Apply a setting value.
        Overrides:
        applySetting in class org.hibernate.boot.registry.StandardServiceRegistryBuilder
        Parameters:
        settingName - The name of the setting
        value - The value to use.
        Returns:
        this, for method chaining
      • applySettings

        public org.hibernate.boot.registry.StandardServiceRegistryBuilder applySettings​(Map<String,​Object> settings)
        Apply a groups of setting values.
        Overrides:
        applySettings in class org.hibernate.boot.registry.StandardServiceRegistryBuilder
        Parameters:
        settings - The incoming settings to apply
        Returns:
        this, for method chaining
      • clearSettings

        public void clearSettings()
        Overrides:
        clearSettings in class org.hibernate.boot.registry.StandardServiceRegistryBuilder
      • addInitiator

        public org.hibernate.boot.registry.StandardServiceRegistryBuilder addInitiator​(org.hibernate.boot.registry.StandardServiceInitiator<?> initiator)
        Adds a service initiator.
        Overrides:
        addInitiator in class org.hibernate.boot.registry.StandardServiceRegistryBuilder
        Parameters:
        initiator - The initiator to be added
        Returns:
        this, for method chaining
      • addService

        public <T extends org.hibernate.service.Service> org.hibernate.boot.registry.StandardServiceRegistryBuilder addService​(Class<T> serviceRole,
                                                                                                                               T service)
        Adds a user-provided service.
        Overrides:
        addService in class org.hibernate.boot.registry.StandardServiceRegistryBuilder
        Parameters:
        serviceRole - The role of the service being added
        service - The service implementation
        Returns:
        this, for method chaining
      • disableAutoClose

        public org.hibernate.boot.registry.StandardServiceRegistryBuilder disableAutoClose()
        By default, when a ServiceRegistry is no longer referenced by any other registries as a parent it will be closed.

        Some applications that explicitly build "shared registries" may want to circumvent that behavior.

        This method indicates that the registry being built should not be automatically closed. The caller agrees to take responsibility to close it themselves.

        Overrides:
        disableAutoClose in class org.hibernate.boot.registry.StandardServiceRegistryBuilder
        Returns:
        this, for method chaining
      • enableAutoClose

        public org.hibernate.boot.registry.StandardServiceRegistryBuilder enableAutoClose()
        See the discussion on disableAutoClose(). This method enables the auto-closing.
        Overrides:
        enableAutoClose in class org.hibernate.boot.registry.StandardServiceRegistryBuilder
        Returns:
        this, for method chaining
      • build

        public org.hibernate.boot.registry.StandardServiceRegistry build()
        Build the StandardServiceRegistry.
        Overrides:
        build in class org.hibernate.boot.registry.StandardServiceRegistryBuilder
        Returns:
        The StandardServiceRegistry.
      • getProvidedServices

        public List<org.hibernate.service.internal.ProvidedService<?>> getProvidedServices()
      • getSettings

        @Deprecated
        public Map<String,​Object> getSettings()
        Deprecated.
        Temporarily exposed since Configuration is still around and much code still uses Configuration. This allows code to configure the builder and access that to configure Configuration object.
        Temporarily exposed since Configuration is still around and much code still uses Configuration. This allows code to configure the builder and access that to configure Configuration object (used from HEM atm).
        Overrides:
        getSettings in class org.hibernate.boot.registry.StandardServiceRegistryBuilder
        Returns:
        The settings map.
      • destroy

        public static void destroy​(org.hibernate.service.ServiceRegistry serviceRegistry)
        Destroy a service registry. Applications should only destroy registries they have explicitly created.
        Parameters:
        serviceRegistry - The registry to be closed.
      • getPostBuildProvidedServices

        public List<Class<? extends org.hibernate.service.Service>> getPostBuildProvidedServices()
        Returns:
        the list of services to get from the service registry and turn into provided services