SessionIdUtils
public final class SessionIdUtils
源码Source
io/agentscope/harness/agent/gateway/SessionIdUtils.java:28–52会话标识 Utils,承载智能体的部署、调度与服务化运行。位于 io.agentscope.harness.agent.gateway 包。核心成员包括 deterministicHash。
Deterministic session-ID derivation. Produces a 12-character hex string from arbitrary input parts using SHA-256, guaranteeing the same inputs always yield the same output regardless of JVM instance or machine.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public static String deterministicHash(String... parts)static | 设置该参数。 Returns a 12-character lowercase hex hash derived from the given parts joined by `"/"`. |
方法详情Method Detail
deterministicHash
public static String deterministicHash(String... parts)
static
设置该参数。
Returns a 12-character lowercase hex hash derived from the given parts joined by "/".
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
parts varargs | String... | parts(类型 `String...`)。one or more non-null seed values |
String返回字符串结果。12-char hex string
源码Source
io/agentscope/harness/agent/gateway/SessionIdUtils.java:42–51