Class CheckingVertxContext
- java.lang.Object
-
- org.hibernate.reactive.context.impl.VertxContext
-
- io.quarkus.hibernate.reactive.runtime.customized.CheckingVertxContext
-
- All Implemented Interfaces:
Serializable,Executor,org.hibernate.reactive.context.Context,org.hibernate.service.Service,org.hibernate.service.spi.ServiceRegistryAwareService
public final class CheckingVertxContext extends org.hibernate.reactive.context.impl.VertxContextTheVertxContextin Hibernate Reactive is accessing the Vert.x context directly, assuming this is the correct context as intended by the developer, as Hibernate Reactive has no opinion in regard to how Vert.x is integrated with other components. The precise definition of "correct context" will most likely depend on the runtime model and how other components are integrated with Vert.x; in particular the lifecycle of the context needs to be specified. For example in Quarkus's RestEasy Reactive we ensure that each request will run on a separate context; this ensures operations relating to different web requests are isolated among each other. To ensure that Quarkus users are using Hibernate Reactive on a context which is compatible with its expectations, this alternative implementation ofVertxContextactually checks on each context access if it's safe to use by invokingVertxContextSafetyToggle.validateContextIfExists(String, String).- See Also:
VertxContextSafetyToggle, Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.hibernate.reactive.context.Context
org.hibernate.reactive.context.Context.Key<T extends Object>
-
-
Constructor Summary
Constructors Constructor Description CheckingVertxContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> Tget(org.hibernate.reactive.context.Context.Key<T> key)<T> voidput(org.hibernate.reactive.context.Context.Key<T> key, T instance)voidremove(org.hibernate.reactive.context.Context.Key<?> key)
-
-
-
Method Detail
-
put
public <T> void put(org.hibernate.reactive.context.Context.Key<T> key, T instance)- Specified by:
putin interfaceorg.hibernate.reactive.context.Context- Overrides:
putin classorg.hibernate.reactive.context.impl.VertxContext
-
get
public <T> T get(org.hibernate.reactive.context.Context.Key<T> key)
- Specified by:
getin interfaceorg.hibernate.reactive.context.Context- Overrides:
getin classorg.hibernate.reactive.context.impl.VertxContext
-
remove
public void remove(org.hibernate.reactive.context.Context.Key<?> key)
- Specified by:
removein interfaceorg.hibernate.reactive.context.Context- Overrides:
removein classorg.hibernate.reactive.context.impl.VertxContext
-
-