Interface ServiceRegistryScope


  • public interface ServiceRegistryScope
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default <R,​S extends org.hibernate.service.Service>
      R
      fromService​(java.lang.Class<S> role, java.util.function.Function<S,​R> action)  
      org.hibernate.boot.registry.StandardServiceRegistry getRegistry()  
      static void using​(java.util.function.Supplier<org.hibernate.boot.registry.StandardServiceRegistry> ssrProducer, java.util.function.Consumer<ServiceRegistryScope> action)
      Generalized support for running exception-safe code using a ServiceRegistry to ensure proper shutdown
      default <S extends org.hibernate.service.Service>
      void
      withService​(java.lang.Class<S> role, java.util.function.Consumer<S> action)  
    • Method Detail

      • using

        static void using​(java.util.function.Supplier<org.hibernate.boot.registry.StandardServiceRegistry> ssrProducer,
                          java.util.function.Consumer<ServiceRegistryScope> action)
        Generalized support for running exception-safe code using a ServiceRegistry to ensure proper shutdown
      • getRegistry

        org.hibernate.boot.registry.StandardServiceRegistry getRegistry()
      • withService

        default <S extends org.hibernate.service.Service> void withService​(java.lang.Class<S> role,
                                                                           java.util.function.Consumer<S> action)
      • fromService

        default <R,​S extends org.hibernate.service.Service> R fromService​(java.lang.Class<S> role,
                                                                                java.util.function.Function<S,​R> action)