CompletableFutureClassifier

Java-friendly wrapper around a Classifier that it owns: classify calls Classifier.classify in the caller's OpenTelemetry context and the passed coroutineContext, returning a CompletableFuture of the result. Canceling a future cancels its call, and a Job in coroutineContext is ignored.

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard

The wrapped classifier, for code that has dropped into Kotlin.

Link copied to clipboard
Link copied to clipboard
open override fun close()

Cancels calls in flight, then closes the classifier if it is AutoCloseable. Every later call returns a canceled future.