SessionEventNotifier
@Service public class SessionEventNotifier
源码Source
io/agentscope/builder/web/managed/service/SessionEventNotifier.java:46–170会话事件 Notifier,承载智能体的部署、调度与服务化运行。位于 io.agentscope.builder.web.managed.service 包。核心成员包括 publish、wakeups、SessionEventNotifier。
Wakes session-event readers without continuously polling the event table.
Every append emits an in-process signal. PostgreSQL deployments additionally publish and
listen on a database channel so subscribers in other data-plane replicas wake immediately. A
missed database notification is harmless: SessionEventLog periodically performs a
low-frequency recovery read from its durable sequence cursor.
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public SessionEventNotifier(DataSource dataSource, long reconnectDelayMs) | 初始化 `SessionEventNotifier` 实例。 Creates a new instance. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public void publish(String sessionId) | 设置发布。 Emits a local wakeup and best-effort PostgreSQL notification after the event commits. |
public Flux<String> wakeups(String sessionId) | 设置该参数。 Returns coalescible wakeups for one session. |
构造器详情Constructor Detail
SessionEventNotifier
public SessionEventNotifier(DataSource dataSource, long reconnectDelayMs)
初始化 SessionEventNotifier 实例。
Creates a new instance.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
dataSource | DataSource | 数据来源(类型 `DataSource`)。The data source. |
reconnectDelayMs | long | 重连延迟 Ms(类型 `long`)。The reconnect delay ms. |
源码Source
io/agentscope/builder/web/managed/service/SessionEventNotifier.java:61–67方法详情Method Detail
publish
public void publish(String sessionId)
设置发布。
Emits a local wakeup and best-effort PostgreSQL notification after the event commits.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
sessionId | String | 会话标识(类型 `String`)。The session id. |
源码Source
io/agentscope/builder/web/managed/service/SessionEventNotifier.java:94–109wakeups
public Flux<String> wakeups(String sessionId)
设置该参数。
Returns coalescible wakeups for one session.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
sessionId | String | 会话标识(类型 `String`)。The session id. |
Flux<String>返回Flux。Returns flux.
源码Source
io/agentscope/builder/web/managed/service/SessionEventNotifier.java:112–114