Package com.bytedesk.core.thread
Class ActiveThreadCache
java.lang.Object
com.bytedesk.core.thread.ActiveThreadCache
- All Implemented Interfaces:
Serializable
活跃会话缓存数据结构
用于在 Redis 中缓存活跃服务会话的关键信息,避免频繁查询数据库
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ActiveThreadCache从 JSON 字符串解析static ActiveThreadCachefromThread(ThreadEntity thread) 从 ThreadEntity 创建缓存对象toJson()转换为 JSON 字符串voidupdateStatus(String status) 更新状态void更新最后更新时间
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
uid
会话 UID -
topic
会话 Topic -
type
会话类型: AGENT, WORKGROUP, ROBOT -
status
会话状态 -
extra
会话 extra(包含 ServiceSettings 配置) -
updatedAtMillis
最后更新时间戳(毫秒) -
orgUid
组织 UID
-
-
Constructor Details
-
ActiveThreadCache
public ActiveThreadCache()
-
-
Method Details
-
fromThread
从 ThreadEntity 创建缓存对象 -
toJson
转换为 JSON 字符串 -
fromJson
从 JSON 字符串解析 -
updateTimestamp
public void updateTimestamp()更新最后更新时间 -
updateStatus
更新状态
-