AS AgentScopeAPI 手册 / API Reference

InMemoryAccessTokenStore

public final class InMemoryAccessTokenStore implements AccessTokenStore
源码Source io/agentscope/extensions/channel/common/InMemoryAccessTokenStore.java:28–60

In 记忆访问令牌存储,负责持久化与读取数据。位于 io.agentscope.extensions.channel.common 包,实现 AccessTokenStore。核心成员包括 get、put、putIfNewer、clear。

In-process AccessTokenStore holding a single token entry.

State lives in the JVM heap, so a token cached here is not visible to other instances; see AccessTokenStore for multi-instance deployments. #putIfNewer merges racing stores atomically (freshest wins). This class is thread-safe.

方法摘要Method Summary

方法Method说明Description
public CachedAccessToken get()
按条件读取数据。
Returns the get.
public void put(CachedAccessToken token)
设置该参数。
Performs the put operation.
public boolean putIfNewer(CachedAccessToken token)
设置该参数。
Performs the put if newer operation.
public void clear()
清空或重置内部状态。
Clears or resets internal state.

方法详情Method Detail

get

public CachedAccessToken get()

按条件读取数据。

Returns the get.

返回Returns CachedAccessToken
返回CachedAccessToken。Returns cached access token.
源码Source io/agentscope/extensions/channel/common/InMemoryAccessTokenStore.java:32–35

put

public void put(CachedAccessToken token)

设置该参数。

Performs the put operation.

参数Parameters
名称Name类型Type说明Description
tokenCachedAccessToken令牌(类型 `CachedAccessToken`)。The token.
源码Source io/agentscope/extensions/channel/common/InMemoryAccessTokenStore.java:37–40

putIfNewer

public boolean putIfNewer(CachedAccessToken token)

设置该参数。

Performs the put if newer operation.

参数Parameters
名称Name类型Type说明Description
tokenCachedAccessToken令牌(类型 `CachedAccessToken`)。The token.
返回Returns boolean
返回布尔值,表示判断结果。Returns a boolean result.
源码Source io/agentscope/extensions/channel/common/InMemoryAccessTokenStore.java:42–54

clear

public void clear()

清空或重置内部状态。

Clears or resets internal state.

源码Source io/agentscope/extensions/channel/common/InMemoryAccessTokenStore.java:56–59
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.