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 |
|---|---|---|
value | T | 执行值相关操作。 the loaded state, or `null` when the key is absent |
version | long | 执行版本相关操作。 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–32version
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.
boolean返回布尔值,表示判断结果。Returns a boolean result.
源码Source
io/agentscope/core/state/VersionedState.java:29–31