SetAssociativeCacheSidecarImage<DataType extends Object> class

A logical image of set-associative tags, payloads, and validity sidecars.

Entries are flattened in set-major order. Invalid entries are omitted from allocatedSlots, so stale payload and tag bits are not part of the logical cache state.

Constructors

SetAssociativeCacheSidecarImage({required int setCount, required int wayCount, required Iterable<int?> tags, required Iterable<DataType?> payloads, required Iterable<int> allocatedSlots})
Creates a validated set-associative cache image.

Properties

allocatedSlots → Set<int>
Valid flattened slots.
final
capacity → int
Number of flattened cache slots.
no setter
hashCode → int
The hash code for this object.
no setterinherited
payloads → List<DataType?>
Payload at each flattened slot.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
setCount → int
Number of cache sets.
final
tags → List<int?>
Tag at each flattened slot.
final
wayCount → int
Number of ways per set.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
slot(int set, int way) → int
Converts a set/way pair into a flattened slot.
toJson(StateValueEncoder<DataType> encodeData) → Map<String, Object?>
Encodes this image as JSON-compatible data.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

fromJson<DataType extends Object>(Map<String, Object?> json, StateValueDecoder<DataType> decodeData) → SetAssociativeCacheSidecarImage<DataType>
Decodes a set-associative cache image.

Constants

kind → const String
Stable schema identifier.
version → const int
Current schema version.