Class ContextHolder
java.lang.Object
io.smallrye.reactive.messaging.kafka.commit.ContextHolder
- Direct Known Subclasses:
KafkaCheckpointCommit
,KafkaDelayedRetryTopic
,KafkaLatestCommit
,KafkaThrottledLatestProcessedCommit
A class holding a vert.x context to make sure methods are always run from the same one.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
capture
(io.vertx.core.Context context) void
capture
(io.vertx.mutiny.core.Context context) io.vertx.mutiny.core.Context
int
void
runOnContext
(Runnable runnable) <T> T
runOnContextAndAwait
(Callable<T> action)
-
Field Details
-
vertx
protected final io.vertx.mutiny.core.Vertx vertx -
context
protected volatile io.vertx.mutiny.core.Context context
-
-
Constructor Details
-
ContextHolder
public ContextHolder(io.vertx.mutiny.core.Vertx vertx, int defaultTimeout)
-
-
Method Details
-
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
-
runOnContextAndAwait
-