DiskStatus class
An immutable snapshot describing one disk in the RAID array.
- Annotations
-
- @immutable
Constructors
-
DiskStatus({required String path, required int diskIndex, required DiskHealth health, required int totalBytes, required int availableBytes, List<
String> errorLogs = const [], double? readLatencyMs, double? writeLatencyMs, DateTime? lastChecked}) -
Creates a DiskStatus.
const
Properties
- availableBytes → int
-
Free capacity in bytes.
final
- diskIndex → int
-
Zero-based index of this disk in the array.
final
-
errorLogs
→ List<
String> -
Recent error messages collected during I/O operations.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- health → DiskHealth
-
Current health classification.
final
- isFailed → bool
-
Convenience shorthand — returns
truewhen health is DiskHealth.failed.no setter - isReadable → bool
-
Returns
truewhen the disk is either healthy or merely degraded.no setter - lastChecked → DateTime
-
Timestamp of last health check.
final
- path → String
-
Filesystem path where this disk's data directory lives.
final
- readLatencyMs → double?
-
Average read latency in milliseconds (null = not measured).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- totalBytes → int
-
Total capacity in bytes.
final
- usedBytes → int
-
Bytes actually used on the disk.
no setter
- utilizationFraction → double
-
Fraction of the disk that is in use (0.0 – 1.0).
no setter
- utilizationPercentage → double
-
Utilisation expressed as a percentage (0 – 100).
no setter
- writeLatencyMs → double?
-
Average write latency in milliseconds (null = not measured).
final
Methods
-
copyWith(
{String? path, int? diskIndex, DiskHealth? health, int? totalBytes, int? availableBytes, List< String> ? errorLogs, double? readLatencyMs, double? writeLatencyMs, DateTime? lastChecked}) → DiskStatus - Creates a copy with optional field overrides.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override