Class VertxContext
- java.lang.Object
-
- org.hibernate.reactive.context.impl.VertxContext
-
- All Implemented Interfaces:
java.io.Serializable
,java.util.concurrent.Executor
,Context
,org.hibernate.service.Service
,org.hibernate.service.spi.ServiceRegistryAwareService
public class VertxContext extends java.lang.Object implements Context, org.hibernate.service.spi.ServiceRegistryAwareService
An adaptor for the Vert.xContext
.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.hibernate.reactive.context.Context
Context.Key<T>
-
-
Constructor Summary
Constructors Constructor Description VertxContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute(java.lang.Runnable runnable)
Run the given command in a context.<T> T
get(Context.Key<T> key)
Get a value associated with the current reactive stream, or return null.void
injectServices(org.hibernate.service.spi.ServiceRegistryImplementor serviceRegistry)
<T> void
put(Context.Key<T> key, T instance)
Associate a value with the current reactive stream.void
remove(Context.Key<?> key)
Remove a value associated with the current reactive stream.
-
-
-
Method Detail
-
injectServices
public void injectServices(org.hibernate.service.spi.ServiceRegistryImplementor serviceRegistry)
- Specified by:
injectServices
in interfaceorg.hibernate.service.spi.ServiceRegistryAwareService
-
put
public <T> void put(Context.Key<T> key, T instance)
Description copied from interface:Context
Associate a value with the current reactive stream.
-
get
public <T> T get(Context.Key<T> key)
Description copied from interface:Context
Get a value associated with the current reactive stream, or return null.
-
remove
public void remove(Context.Key<?> key)
Description copied from interface:Context
Remove a value associated with the current reactive stream.
-
execute
public void execute(java.lang.Runnable runnable)
Description copied from interface:Context
Run the given command in a context. If there is a context already associated with the call, use that one. Otherwise, create a new context and execute the command in the new context. In case a new context is created, it will ensure a local context is created.
-
-