AS AgentScopeAPI 手册 / API Reference

RedisContainerQueue

public class RedisContainerQueue implements ContainerQueue
源码Source io/agentscope/runtime/sandbox/manager/collections/RedisContainerQueue.java:28–109

Redis 容器队列,承载智能体的部署、调度与服务化运行。位于 io.agentscope.runtime.sandbox.manager.collections 包,实现 ContainerQueue。核心成员包括 enqueue、dequeue、peek、isEmpty、size、clear。

Redis-backed implementation of ContainerQueue

构造器摘要Constructor Summary

构造器Constructor说明Description
public RedisContainerQueue(RedisClientWrapper redisClient, String queueName)
初始化 `RedisContainerQueue` 实例。
Creates a new instance.

方法摘要Method Summary

方法Method说明Description
public void enqueue(ContainerModel item)
设置该参数。
Performs the enqueue operation.
public ContainerModel dequeue()
返回 `dequeue` 结果。
Returns the dequeue.
public ContainerModel peek()
返回 `peek` 结果。
Returns the peek.
public boolean isEmpty()
判断是否 `isEmpty`。
Returns whether the empty.
public int size()
返回大小。
Returns the size.
public void clear()
清空或重置内部状态。
Clears or resets internal state.

构造器详情Constructor Detail

RedisContainerQueue

public RedisContainerQueue(RedisClientWrapper redisClient, String queueName)

初始化 RedisContainerQueue 实例。

Creates a new instance.

参数Parameters
名称Name类型Type说明Description
redisClientRedisClientWrapperRedis 客户端(类型 `RedisClientWrapper`)。The redis client.
queueNameString队列名称(类型 `String`)。The queue name.
源码Source io/agentscope/runtime/sandbox/manager/collections/RedisContainerQueue.java:36–41

方法详情Method Detail

enqueue

public void enqueue(ContainerModel item)

设置该参数。

Performs the enqueue operation.

参数Parameters
名称Name类型Type说明Description
itemContainerModel条目(类型 `ContainerModel`)。The item.
源码Source io/agentscope/runtime/sandbox/manager/collections/RedisContainerQueue.java:43–58

dequeue

public ContainerModel dequeue()

返回 dequeue 结果。

Returns the dequeue.

返回Returns ContainerModel
返回ContainerModel。Returns container model.
源码Source io/agentscope/runtime/sandbox/manager/collections/RedisContainerQueue.java:60–75

peek

public ContainerModel peek()

返回 peek 结果。

Returns the peek.

返回Returns ContainerModel
返回ContainerModel。Returns container model.
源码Source io/agentscope/runtime/sandbox/manager/collections/RedisContainerQueue.java:77–90

isEmpty

public boolean isEmpty()

判断是否 isEmpty。

Returns whether the empty.

返回Returns boolean
返回布尔值,表示判断结果。Returns a boolean result.
源码Source io/agentscope/runtime/sandbox/manager/collections/RedisContainerQueue.java:92–96

size

public int size()

返回大小。

Returns the size.

返回Returns int
返回数值结果。Returns a numeric result.
源码Source io/agentscope/runtime/sandbox/manager/collections/RedisContainerQueue.java:98–102

clear

public void clear()

清空或重置内部状态。

Clears or resets internal state.

源码Source io/agentscope/runtime/sandbox/manager/collections/RedisContainerQueue.java:104–108
基于官方固定版本源码静态生成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.