AS AgentScopeAPI 手册 / API Reference

ConcurrentSessionModificationException

public class ConcurrentSessionModificationException extends RuntimeException
源码Source io/agentscope/core/state/ConcurrentSessionModificationException.java:22–63

Concurrent 会话 Modification 异常,表示执行过程中的错误。位于 io.agentscope.core.state 包,继承自 RuntimeException。核心成员包括 getUserId、getSessionId、getKey、getExpectedVersion、ConcurrentSessionModificationException。

Thrown when an optimistic-concurrency save fails because another writer changed the same session slot since it was loaded.

构造器摘要Constructor Summary

构造器Constructor说明Description
public ConcurrentSessionModificationException(String userId, String sessionId, String key, long expectedVersion)
初始化 `ConcurrentSessionModificationException` 实例。
Creates a new instance.

方法摘要Method Summary

方法Method说明Description
public String getUserId()
获取用户标识。
Returns the user id.
public String getSessionId()
获取会话标识。
Returns the session id.
public String getKey()
获取键。
Returns the key.
public long getExpectedVersion()
获取 `getExpectedVersion`。
Returns the expected version.

构造器详情Constructor Detail

ConcurrentSessionModificationException

public ConcurrentSessionModificationException(String userId, String sessionId, String key, long expectedVersion)

初始化 ConcurrentSessionModificationException 实例。

Creates a new instance.

参数Parameters
名称Name类型Type说明Description
userIdString用户标识(类型 `String`)。The user id.
sessionIdString会话标识(类型 `String`)。The session id.
keyString键(类型 `String`)。The key.
expectedVersionlongexpected 版本(类型 `long`)。The expected version.
源码Source io/agentscope/core/state/ConcurrentSessionModificationException.java:29–46

方法详情Method Detail

getUserId

public String getUserId()

获取用户标识。

Returns the user id.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/core/state/ConcurrentSessionModificationException.java:48–50

getSessionId

public String getSessionId()

获取会话标识。

Returns the session id.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/core/state/ConcurrentSessionModificationException.java:52–54

getKey

public String getKey()

获取键。

Returns the key.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/core/state/ConcurrentSessionModificationException.java:56–58

getExpectedVersion

public long getExpectedVersion()

获取 getExpectedVersion。

Returns the expected version.

返回Returns long
返回数值结果。Returns a numeric result.
源码Source io/agentscope/core/state/ConcurrentSessionModificationException.java:60–62
基于官方固定版本源码静态生成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.