Package org.hibernate.reactive.context
Interface Context
- All Superinterfaces:
Executor
,Serializable
,Service
Abstracts away from the Vert.x
Context
object, enabling alternative strategies for associating state
with the current reactive stream.-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
An object that identifies something we store in the Vert.x local context, usually aSession
orStatelessSession
, but in principle anything at all. -
Method Summary
Modifier and TypeMethodDescriptionvoid
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.<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 Details
-
put
Associate a value with the current reactive stream. -
get
Get a value associated with the current reactive stream, or return null. -
remove
Remove a value associated with the current reactive stream. -
execute
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.
-