Class ActiveThreadCache

java.lang.Object
com.bytedesk.core.thread.ActiveThreadCache
All Implemented Interfaces:
Serializable

public class ActiveThreadCache extends Object implements Serializable
活跃会话缓存数据结构 用于在 Redis 中缓存活跃服务会话的关键信息,避免频繁查询数据库
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • uid

      private String uid
      会话 UID
    • topic

      private String topic
      会话 Topic
    • type

      private String type
      会话类型: AGENT, WORKGROUP, ROBOT
    • status

      private String status
      会话状态
    • extra

      private String extra
      会话 extra(包含 ServiceSettings 配置)
    • updatedAtMillis

      private Long updatedAtMillis
      最后更新时间戳(毫秒)
    • orgUid

      private String orgUid
      组织 UID
  • Constructor Details

    • ActiveThreadCache

      public ActiveThreadCache()
  • Method Details

    • fromThread

      public static ActiveThreadCache fromThread(ThreadEntity thread)
      从 ThreadEntity 创建缓存对象
    • toJson

      public String toJson()
      转换为 JSON 字符串
    • fromJson

      public static ActiveThreadCache fromJson(String json)
      从 JSON 字符串解析
    • updateTimestamp

      public void updateTimestamp()
      更新最后更新时间
    • updateStatus

      public void updateStatus(String status)
      更新状态