AS AgentScopeAPI 手册 / API Reference

VersionedState

public record VersionedState<T extends State>(T value, long version)
源码Source io/agentscope/core/state/VersionedState.java:26–32

承载 Versioned 状态数据的记录类型。位于 io.agentscope.core.state 包。核心成员包括 value、version、isPresent。

A state value paired with its optimistic-concurrency version from an AgentStateStore.

记录组件摘要Record Component Summary

组件Component类型Type说明Description
valueT
执行值相关操作。
the loaded state, or `null` when the key is absent
versionlong
执行版本相关操作。
the store version; `AgentStateStore#UNVERSIONED` when the backend does not support versioning, or `0` when the key does not yet exist on a versioning backend

方法摘要Method Summary

方法Method说明Description
public boolean isPresent()
判断是否 `isPresent`。
Returns `true` when a value was present in the store.

记录组件详情Record Component Detail

value

T value

执行值相关操作。

the loaded state, or null when the key is absent

源码Source io/agentscope/core/state/VersionedState.java:26–32

version

long version

执行版本相关操作。

the store version; AgentStateStore#UNVERSIONED when the backend does not support versioning, or 0 when the key does not yet exist on a versioning backend

源码Source io/agentscope/core/state/VersionedState.java:26–32

方法详情Method Detail

isPresent

public boolean isPresent()

判断是否 isPresent。

Returns true when a value was present in the store.

返回Returns boolean
返回布尔值,表示判断结果。Returns a boolean result.
源码Source io/agentscope/core/state/VersionedState.java:29–31
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.