AS AgentScopeAPI 手册 / API Reference

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
sessionIdString会话标识(类型 `String`)。Unique identifier for the session
sizelong会话存储 in 字节的大小。Size of the session storage in bytes
lastModifiedlong最后 Modified(类型 `long`)。Last modification timestamp in milliseconds since epoch
componentCountintcomponent 数量(类型 `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.

返回Returns String
会话标识。The session ID
源码Source io/agentscope/core/state/SessionInfo.java:51–53

getSize

public long getSize()

获取大小的会话存储。

Get the size of the session storage.

返回Returns long
返回数值结果。Size in bytes
源码Source io/agentscope/core/state/SessionInfo.java:60–62

getLastModified

public long getLastModified()

获取 getLastModified。

Get the last modification timestamp.

返回Returns long
返回数值结果。Timestamp in milliseconds since epoch
源码Source io/agentscope/core/state/SessionInfo.java:69–71

getComponentCount

public int getComponentCount()

获取 getComponentCount。

Get the number of state components stored in this session.

返回Returns int
返回数值结果。Number of components
源码Source io/agentscope/core/state/SessionInfo.java:78–80

toString

public String toString()

返回 toString 结果。

Returns a string representation of the session information.

返回Returns String
返回字符串结果。Formatted string containing session ID, size, last modified time, and component count
源码Source io/agentscope/core/state/SessionInfo.java:87–92
基于官方固定版本源码静态生成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.