类 SessionInfo

java.lang.Object
io.agentscope.core.session.SessionInfo

public class SessionInfo extends Object
Information about a session.

Contains metadata about stored sessions including size, modification time, and the number of state components saved in the session.

  • 构造器详细资料

    • SessionInfo

      public SessionInfo(String sessionId, long size, long lastModified, int componentCount)
      Create a new SessionInfo instance.
      参数:
      sessionId - Unique identifier for the session
      size - Size of the session storage in bytes
      lastModified - Last modification timestamp in milliseconds since epoch
      componentCount - Number of state components stored in the session
  • 方法详细资料

    • getSessionId

      public String getSessionId()
      Get the unique identifier for this session.
      返回:
      The session ID
    • getSize

      public long getSize()
      Get the size of the session storage.
      返回:
      Size in bytes
    • getLastModified

      public long getLastModified()
      Get the last modification timestamp.
      返回:
      Timestamp in milliseconds since epoch
    • getComponentCount

      public int getComponentCount()
      Get the number of state components stored in this session.
      返回:
      Number of components
    • toString

      public String toString()
      Returns a string representation of the session information.
      覆盖:
      toString 在类中 Object
      返回:
      Formatted string containing session ID, size, last modified time, and component count