可完成的(任务或操作)未来Artifact服务(Service)

Java-friendly wrapper around an ArtifactService that it owns: each method calls the suspend method of the same name and returns a CompletableFuture of its result, so Java callers never pass a Continuation. Each call runs in the caller's OpenTelemetry context and in the coroutineContext passed to it, such as MDCContext() from kotlinx-coroutines-slf4j to carry the caller's MDC. Canceling a future cancels its call, a Job in coroutineContext is ignored, and close cancels every call in flight, then closes the service if it is AutoCloseable.

类型

Link copied to clipboard
object Companion

函数

Link copied to clipboard

这个用于处理已转换为 Kotlin 语言的代码的封装服务(wrapped artifact service)。

Link copied to clipboard
open override fun close()

在通话进行中取消通话;如果该服务仍处于开启状态,则关闭该服务。 AutoCloseable后续的每次调用都会返回一个已被取消的“future”对象(即那些原本应该在未来某个时间执行的操作)。

Link copied to clipboard
fun deleteArtifact(sessionKey: SessionKey, filename: String, coroutineContext: CoroutineContext = EmptyCoroutineContext): CompletableFuture<Void?>

调用(函数或方法) ArtifactService.deleteArtifact.

Link copied to clipboard
fun listArtifactKeys(sessionKey: SessionKey, coroutineContext: CoroutineContext = EmptyCoroutineContext): CompletableFuture<List<String>>

调用(函数或方法) ArtifactService.listArtifactKeys.

Link copied to clipboard
fun listVersions(sessionKey: SessionKey, filename: String, coroutineContext: CoroutineContext = EmptyCoroutineContext): CompletableFuture<List<Int>>

调用(函数或方法) ArtifactService.listVersions.

Link copied to clipboard
fun loadArtifact(sessionKey: SessionKey, filename: String, version: Int? = null, coroutineContext: CoroutineContext = EmptyCoroutineContext): CompletableFuture<Part?>

调用(函数或方法) ArtifactService.loadArtifact该功能会在需要时加载最新版本的软件/程序。 版本 是 null……未来就这样完成了。 null 如果不存在这样的工件(artifact),则……

Link copied to clipboard
fun saveAndReloadArtifact(sessionKey: SessionKey, filename: String, artifact: Part, coroutineContext: CoroutineContext = EmptyCoroutineContext): CompletableFuture<Part>

调用(函数或方法) ArtifactService.saveAndReloadArtifact.

Link copied to clipboard
fun saveArtifact(sessionKey: SessionKey, filename: String, artifact: Part, coroutineContext: CoroutineContext = EmptyCoroutineContext): CompletableFuture<Int>

调用(函数或方法) ArtifactService.saveArtifact未来的版本将以保存后的数据为准(即:未来的版本会使用已经保存的数据来进行更新或运行)。