Class ContextHolder
- java.lang.Object
-
- io.smallrye.reactive.messaging.kafka.commit.ContextHolder
-
- Direct Known Subclasses:
KafkaCheckpointCommit
,KafkaLatestCommit
,KafkaThrottledLatestProcessedCommit
public class ContextHolder extends Object
A class holding a vert.x context to make sure methods are always run from the same one.
-
-
Constructor Summary
Constructors Constructor Description ContextHolder(io.vertx.mutiny.core.Vertx vertx, int defaultTimeout)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
capture(io.vertx.core.Context context)
void
capture(io.vertx.mutiny.core.Context context)
io.vertx.mutiny.core.Context
getContext()
int
getTimeoutInMillis()
void
runOnContext(Runnable runnable)
<T> T
runOnContextAndAwait(Callable<T> action)
-
-
-
Method Detail
-
capture
public void capture(io.vertx.mutiny.core.Context context)
-
capture
public void capture(io.vertx.core.Context context)
-
getContext
public io.vertx.mutiny.core.Context getContext()
-
getTimeoutInMillis
public int getTimeoutInMillis()
-
runOnContext
public void runOnContext(Runnable runnable)
-
runOnContextAndAwait
public <T> T runOnContextAndAwait(Callable<T> action)
-
-