Table of Contents

Class CellPool

Namespace
KernLab.Cell
Assembly
KernLab.Cell.dll

spec 池(§5.1):按 spec 全值分键;同规格替补;并发租借。 异规格替补被拒=结构断言(宁可红不可凑数)。

public sealed class CellPool
Inheritance
CellPool
Inherited Members

Constructors

CellPool()

public CellPool()

Methods

Find(CellSpec)

按 spec 精确取项(未命中=null)。

public CellPoolEntry? Find(CellSpec spec)

Parameters

spec CellSpec

Returns

CellPoolEntry

GetOrAdd(CellSpec, Func<CellSpec, ICellContainerInstance>)

取或建(spec 全值分键——并发安全;工厂只在未命中时调用)。

public CellPoolEntry GetOrAdd(CellSpec spec, Func<CellSpec, ICellContainerInstance> factory)

Parameters

spec CellSpec
factory Func<CellSpec, ICellContainerInstance>

Returns

CellPoolEntry

Remove(CellPoolEntry)

退池(世代轮换/容器退役——旧世代条目移出;幂等)。

public bool Remove(CellPoolEntry entry)

Parameters

entry CellPoolEntry

Returns

bool

Snapshot()

全部池项快照(监督面遍历用)。

public IReadOnlyList<CellPoolEntry> Snapshot()

Returns

IReadOnlyList<CellPoolEntry>