SessionInfo
public class SessionInfo
源码Source
io/agentscope/core/state/SessionInfo.java:25–93会话信息,在多次调用之间保存和恢复会话与记忆数据。位于 io.agentscope.core.state 包。核心成员包括 getSessionId、getSize、getLastModified、getComponentCount、toString、SessionInfo。
Information about a session.
Contains metadata about stored sessions including size, modification time, and the number of state components saved in the session.
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public SessionInfo(String sessionId, long size, long lastModified, int componentCount) | 创建新的SessionInfo 实例。 Create a new SessionInfo instance. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public String getSessionId() | 获取会话标识。 Get the unique identifier for this session. |
public long getSize() | 获取大小的会话存储。 Get the size of the session storage. |
public long getLastModified() | 获取 `getLastModified`。 Get the last modification timestamp. |
public int getComponentCount() | 获取 `getComponentCount`。 Get the number of state components stored in this session. |
public String toString() | 返回 `toString` 结果。 Returns a string representation of the session information. |
构造器详情Constructor Detail
SessionInfo
public SessionInfo(String sessionId, long size, long lastModified, int componentCount)
创建新的SessionInfo 实例。
Create a new SessionInfo instance.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
sessionId | String | 会话标识(类型 `String`)。Unique identifier for the session |
size | long | 会话存储 in 字节的大小。Size of the session storage in bytes |
lastModified | long | 最后 Modified(类型 `long`)。Last modification timestamp in milliseconds since epoch |
componentCount | int | component 数量(类型 `int`)。Number of state components stored in the session |
源码Source
io/agentscope/core/state/SessionInfo.java:39–44方法详情Method Detail
getSessionId
public String getSessionId()
获取会话标识。
Get the unique identifier for this session.
String会话标识。The session ID
源码Source
io/agentscope/core/state/SessionInfo.java:51–53getSize
public long getSize()
获取大小的会话存储。
Get the size of the session storage.
long返回数值结果。Size in bytes
源码Source
io/agentscope/core/state/SessionInfo.java:60–62getLastModified
public long getLastModified()
获取 getLastModified。
Get the last modification timestamp.
long返回数值结果。Timestamp in milliseconds since epoch
源码Source
io/agentscope/core/state/SessionInfo.java:69–71getComponentCount
public int getComponentCount()
获取 getComponentCount。
Get the number of state components stored in this session.
int返回数值结果。Number of components
源码Source
io/agentscope/core/state/SessionInfo.java:78–80toString
public String toString()
返回 toString 结果。
Returns a string representation of the session information.
String返回字符串结果。Formatted string containing session ID, size, last modified time, and component count
源码Source
io/agentscope/core/state/SessionInfo.java:87–92