RedisContainerQueue
public class RedisContainerQueue implements ContainerQueue
源码Source
io/agentscope/runtime/sandbox/manager/collections/RedisContainerQueue.java:28–109Redis 容器队列,承载智能体的部署、调度与服务化运行。位于 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 |
|---|---|---|
redisClient | RedisClientWrapper | Redis 客户端(类型 `RedisClientWrapper`)。The redis client. |
queueName | String | 队列名称(类型 `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 |
|---|---|---|
item | ContainerModel | 条目(类型 `ContainerModel`)。The item. |
源码Source
io/agentscope/runtime/sandbox/manager/collections/RedisContainerQueue.java:43–58dequeue
public ContainerModel dequeue()
返回 dequeue 结果。
Returns the dequeue.
ContainerModel返回ContainerModel。Returns container model.
源码Source
io/agentscope/runtime/sandbox/manager/collections/RedisContainerQueue.java:60–75peek
public ContainerModel peek()
返回 peek 结果。
Returns the peek.
ContainerModel返回ContainerModel。Returns container model.
源码Source
io/agentscope/runtime/sandbox/manager/collections/RedisContainerQueue.java:77–90isEmpty
public boolean isEmpty()
判断是否 isEmpty。
Returns whether the empty.
boolean返回布尔值,表示判断结果。Returns a boolean result.
源码Source
io/agentscope/runtime/sandbox/manager/collections/RedisContainerQueue.java:92–96size
public int size()
返回大小。
Returns the size.
int返回数值结果。Returns a numeric result.
源码Source
io/agentscope/runtime/sandbox/manager/collections/RedisContainerQueue.java:98–102clear
public void clear()
清空或重置内部状态。
Clears or resets internal state.
源码Source
io/agentscope/runtime/sandbox/manager/collections/RedisContainerQueue.java:104–108