InMemoryContainerQueue
public class InMemoryContainerQueue implements ContainerQueue
源码Source
io/agentscope/runtime/sandbox/manager/collections/InMemoryContainerQueue.java:26–65In 记忆容器队列,承载智能体的部署、调度与服务化运行。位于 io.agentscope.runtime.sandbox.manager.collections 包,实现 ContainerQueue。核心成员包括 enqueue、dequeue、peek、isEmpty、size、clear。
In-memory implementation of ContainerQueue
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public InMemoryContainerQueue() | 初始化 `InMemoryContainerQueue` 实例。 Creates a new instance. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public synchronized void enqueue(ContainerModel item)synchronized | 设置该参数。 Performs the enqueue operation. |
public synchronized ContainerModel dequeue()synchronized | 返回 `dequeue` 结果。 Returns the dequeue. |
public synchronized ContainerModel peek()synchronized | 返回 `peek` 结果。 Returns the peek. |
public synchronized boolean isEmpty()synchronized | 判断是否 `isEmpty`。 Returns whether the empty. |
public synchronized int size()synchronized | 返回大小。 Returns the size. |
public synchronized void clear()synchronized | 清空或重置内部状态。 Clears or resets internal state. |
构造器详情Constructor Detail
InMemoryContainerQueue
public InMemoryContainerQueue()
初始化 InMemoryContainerQueue 实例。
Creates a new instance.
源码Source
io/agentscope/runtime/sandbox/manager/collections/InMemoryContainerQueue.java:30–32方法详情Method Detail
enqueue
public synchronized void enqueue(ContainerModel item)
synchronized
设置该参数。
Performs the enqueue operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
item | ContainerModel | 条目(类型 `ContainerModel`)。The item. |
源码Source
io/agentscope/runtime/sandbox/manager/collections/InMemoryContainerQueue.java:34–39dequeue
public synchronized ContainerModel dequeue()
synchronized
返回 dequeue 结果。
Returns the dequeue.
ContainerModel返回ContainerModel。Returns container model.
源码Source
io/agentscope/runtime/sandbox/manager/collections/InMemoryContainerQueue.java:41–44peek
public synchronized ContainerModel peek()
synchronized
返回 peek 结果。
Returns the peek.
ContainerModel返回ContainerModel。Returns container model.
源码Source
io/agentscope/runtime/sandbox/manager/collections/InMemoryContainerQueue.java:46–49isEmpty
public synchronized boolean isEmpty()
synchronized
判断是否 isEmpty。
Returns whether the empty.
boolean返回布尔值,表示判断结果。Returns a boolean result.
源码Source
io/agentscope/runtime/sandbox/manager/collections/InMemoryContainerQueue.java:51–54size
public synchronized int size()
synchronized
返回大小。
Returns the size.
int返回数值结果。Returns a numeric result.
源码Source
io/agentscope/runtime/sandbox/manager/collections/InMemoryContainerQueue.java:56–59clear
public synchronized void clear()
synchronized
清空或重置内部状态。
Clears or resets internal state.
源码Source
io/agentscope/runtime/sandbox/manager/collections/InMemoryContainerQueue.java:61–64