BudgetSnapshot
What a BudgetStore keeps between runs: the counts of the budget's hard windows, the instant they were taken and the pause in force. A plain value with a public constructor and no serializer: a store chooses its own encoding.
Stable Core. Equality is on every property; toString() prints the version, the stamp, the number of windows and the pause, never an encoding.
Parameters
the layout; CURRENT_VERSION today. The budget ignores (and counts as dropped) the windows of a version it does not know. At least 1.
the wall clock when the snapshot was taken.
the counts, one WindowSnapshot per window start; several starts of one window are allowed.
the epoch millisecond the pause ends, or 0 for none. Not negative.
Throws
if version is below 1 or pausedUntilEpochMillis is negative.
Constructors
The snapshot of CURRENT_VERSION.
Properties
The epoch millisecond the pause ends, or 0 for none. Not negative.
The wall clock when the snapshot was taken, in epoch milliseconds.
The layout; CURRENT_VERSION today. At least 1.
The counts, a read-only copy.
Functions
Two BudgetSnapshots are equal when their version, takenAtEpochMillis, windows and pausedUntilEpochMillis are equal.
A diagnostic string for logs: version, takenAtEpochMillis, the number of windows and pausedUntilEpochMillis. Its format is not part of the API and may change.