Class Win32CacheMemory

java.lang.Object
io.github.eggy03.ferrumx.windows.entity.processor.Win32CacheMemory

@ShallowImmutable public class Win32CacheMemory extends Object
Immutable representation of a processor cache (e.g., L1, L2, L3) on a Windows system.

Fields correspond to properties retrieved from the Win32_CacheMemory WMI class.

Usage examples

// Build a new instance
Win32CacheMemory l2Cache = Win32CacheMemory.builder()
    .deviceId("CPU0_L2")
    .purpose("Instruction")
    .installedSize(512)
    .associativity(8)
    .build();

// Create a modified copy using the builder
Win32CacheMemory resized = l2Cache.toBuilder()
    .installedSize(1024)
    .build();

See Win32Processor for related CPU information.

Since:
3.0.0
See Also:
  • Field Details

    • deviceId

      @SerializedName("DeviceID") @Nullable @Nullable String deviceId
      Unique identifier of the cache instance.

      Example: "Cache Memory 1"

    • purpose

      @SerializedName("Purpose") @Nullable @Nullable String purpose
      Free-form description of the cache purpose or level designation.

      Example: "L2 Cache"

    • cacheType

      @SerializedName("CacheType") @Nullable @Nullable Integer cacheType
      Type of cache.

      Possible values:

      • 1 – Other
      • 2 – Unknown
      • 3 – Instruction
      • 4 – Data
      • 5 – Unified
    • level

      @SerializedName("Level") @Nullable @Nullable Integer level
      Cache hierarchy level.

      Possible values:

      • 1 – Other
      • 2 – Unknown
      • 3 – Primary (L1)
      • 4 – Secondary (L2)
      • 5 – Tertiary (L3)
      • 6 – Not Applicable
    • installedSize

      @SerializedName("InstalledSize") @Nullable @Nullable Long installedSize
      Installed cache size in kilobytes.

      Example: 512 for 512 KB.

    • associativity

      @SerializedName("Associativity") @Nullable @Nullable Integer associativity
      Cache associativity.

      Possible values:

      • 1 – Other
      • 2 – Unknown
      • 3 – Direct Mapped
      • 4 – 2-way Set-Associative
      • 5 – 4-way Set-Associative
      • 6 – Fully Associative
      • 7 – 8-way Set-Associative
      • 8 – 16-way Set-Associative
    • location

      @SerializedName("Location") @Nullable @Nullable Integer location
      Physical cache location relative to the processor.

      Possible values:

      • 0 – Internal
      • 1 – External
      • 2 – Reserved
      • 3 – Unknown
    • errorCorrectType

      @SerializedName("ErrorCorrectType") @Nullable @Nullable Integer errorCorrectType
      Error-correction method used by the cache.

      Possible values:

      • 0 – Reserved
      • 1 – Other
      • 2 – Unknown
      • 3 – None
      • 4 – Parity
      • 5 – Single-bit ECC
      • 6 – Multi-bit ECC
    • availability

      @SerializedName("Availability") @Nullable @Nullable Integer availability
      Current availability and operational state.

      Possible Values:

      • 1 – Other
      • 2 – Unknown
      • 3 – Running/Full Power
      • 4 – Warning
      • 5 – In Test
      • 6 – Not Applicable
      • 7 – Power Off
      • 8 – Offline
      • 9 – Off-duty
      • 10 – Degraded
      • 11 – Not Installed
      • 12 – Install Error
      • 13 – Power Save - Unknown
      • 14 – Power Save - Low Power Mode
      • 15 – Power Save - Standby
      • 16 – Power Cycle
      • 17 – Power Save - Warning
      • 18 – Paused
      • 19 – Not Ready
      • 20 – Not Configured
      • 21 – Quiesced
    • status

      @SerializedName("Status") @Nullable @Nullable String status
      Current operational status of the cache device.

      Possible OPERATIONAL values:

      • "OK"
      • "Degraded"
      • "Pred Fail"

      Possible NON-OPERATIONAL values:

      • "Unknown"
      • "Error"
      • "Starting"
      • "Stopping"
      • "Service"

      Possible OTHER values:

      • "Stressed"
      • "NonRecover"
      • "No Contact"
      • "Lost Comm"
    • statusInfo

      @SerializedName("StatusInfo") @Nullable @Nullable Integer statusInfo
      Logical state of the device.

      Possible values:

      • 1 – Other
      • 2 – Unknown
      • 3 – Enabled
      • 4 – Disabled
      • 5 – Not Applicable
  • Constructor Details

    • Win32CacheMemory

      public Win32CacheMemory()
  • Method Details

    • toString

      @NotNull public @NotNull String toString()
      Retrieves the entity in a JSON pretty-print formatted string
      Overrides:
      toString in class Object
      Returns:
      the String value of the object in JSON pretty-print format