AS AgentScopeAPI 手册 / API Reference

InMemoryContainerQueue

public class InMemoryContainerQueue implements ContainerQueue
源码Source io/agentscope/runtime/sandbox/manager/collections/InMemoryContainerQueue.java:26–65

In 记忆容器队列,承载智能体的部署、调度与服务化运行。位于 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
itemContainerModel条目(类型 `ContainerModel`)。The item.
源码Source io/agentscope/runtime/sandbox/manager/collections/InMemoryContainerQueue.java:34–39

dequeue

public synchronized ContainerModel dequeue()
synchronized

返回 dequeue 结果。

Returns the dequeue.

返回Returns ContainerModel
返回ContainerModel。Returns container model.
源码Source io/agentscope/runtime/sandbox/manager/collections/InMemoryContainerQueue.java:41–44

peek

public synchronized ContainerModel peek()
synchronized

返回 peek 结果。

Returns the peek.

返回Returns ContainerModel
返回ContainerModel。Returns container model.
源码Source io/agentscope/runtime/sandbox/manager/collections/InMemoryContainerQueue.java:46–49

isEmpty

public synchronized boolean isEmpty()
synchronized

判断是否 isEmpty。

Returns whether the empty.

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

size

public synchronized int size()
synchronized

返回大小。

Returns the size.

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

clear

public synchronized void clear()
synchronized

清空或重置内部状态。

Clears or resets internal state.

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