Interface ServiceRegistryScope


public interface ServiceRegistryScope
  • Method Summary

    Modifier and Type
    Method
    Description
    default <R, S extends org.hibernate.service.Service>
    R
    fromService(Class<S> role, Function<S,R> action)
     
    org.hibernate.boot.registry.StandardServiceRegistry
     
    static void
    using(Supplier<org.hibernate.boot.registry.StandardServiceRegistry> ssrProducer, 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(Class<S> role, Consumer<S> action)
     
  • Method Details

    • using

      static void using(Supplier<org.hibernate.boot.registry.StandardServiceRegistry> ssrProducer, 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(Class<S> role, Consumer<S> action)
    • fromService

      default <R, S extends org.hibernate.service.Service> R fromService(Class<S> role, Function<S,R> action)