Table of Contents

Class CellSpec

Namespace
KernLab.Cell
Assembly
KernLab.Cell.dll

容器规格(charter 冻结的一租户一容器,§5.1):租户+包集+世代。 池键=spec 全值——任一分量不同即不同池项;世代语义:包集变更=新世代新容器(热升级不做,D3)。

public sealed class CellSpec : IEquatable<CellSpec>
Inheritance
CellSpec
Implements
Inherited Members

Constructors

CellSpec(string, IReadOnlyList<string>, int)

构造(租户非空、包集非空且去重——同包集去重后一致即同规格)。

public CellSpec(string tenantId, IReadOnlyList<string> packs, int generation)

Parameters

tenantId string
packs IReadOnlyList<string>
generation int

Properties

Generation

世代(包集变更=世代递增——旧容器 drain 后退场)。

public int Generation { get; }

Property Value

int

Packs

包集(归一化:去重+序——集合语义,序不参与等值)。

public IReadOnlyList<string> Packs { get; }

Property Value

IReadOnlyList<string>

TenantId

租户标识。

public string TenantId { get; }

Property Value

string

Methods

Equals(CellSpec?)

等值(租户+包集序列等值+世代——record 声明对 IReadOnlyList 是引用等值,此处显式化)。

public bool Equals(CellSpec? other)

Parameters

other CellSpec

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

Matches(CellSpec)

同规格判定(池键全值等值)。

public bool Matches(CellSpec other)

Parameters

other CellSpec

Returns

bool

ToString()

public override string ToString()

Returns

string