ConcurrentSessionModificationException
public class ConcurrentSessionModificationException extends RuntimeException
源码Source
io/agentscope/core/state/ConcurrentSessionModificationException.java:22–63Concurrent 会话 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 |
|---|---|---|
userId | String | 用户标识(类型 `String`)。The user id. |
sessionId | String | 会话标识(类型 `String`)。The session id. |
key | String | 键(类型 `String`)。The key. |
expectedVersion | long | expected 版本(类型 `long`)。The expected version. |
源码Source
io/agentscope/core/state/ConcurrentSessionModificationException.java:29–46方法详情Method Detail
getUserId
public String getUserId()
获取用户标识。
Returns the user id.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/core/state/ConcurrentSessionModificationException.java:48–50getSessionId
public String getSessionId()
获取会话标识。
Returns the session id.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/core/state/ConcurrentSessionModificationException.java:52–54getKey
public String getKey()
获取键。
Returns the key.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/core/state/ConcurrentSessionModificationException.java:56–58getExpectedVersion
public long getExpectedVersion()
获取 getExpectedVersion。
Returns the expected version.
long返回数值结果。Returns a numeric result.
源码Source
io/agentscope/core/state/ConcurrentSessionModificationException.java:60–62