VERSION
VERSION = 1
Format version written into every manifest.
The ordered record of what one flush captured.
A segment is the unit a flush writes and a replay reads. It holds the operations in sequence order, the frame map that reconstructs each operation's payload, and the counters the UI reports.
The format carries a version. A segment written by one release must stay readable by every later one, because the whole point of the store is that a restore reaches back further than the code does; a reader that meets a version it does not understand says so rather than guessing at the layout.
__construct(int $level, int $firstSequence, int $lastSequence, int $firstMicrotime, int $lastMicrotime, list<\Drupal\strata\Journal\JournalOp> $operations, array> $payloads = [], int $collapsedFrom = 0, int $rawBytes = 0, int $version = \self::VERSION) : mixed
Constructs a manifest.
| int | $level | Compaction level; 0 for a freshly flushed segment, higher after a rollup. |
| int | $firstSequence | Journal sequence of the earliest operation. |
| int | $lastSequence | Journal sequence of the latest operation. |
| int | $firstMicrotime | Unix microseconds of the earliest operation. |
| int | $lastMicrotime | Unix microseconds of the latest operation. |
| list<\Drupal\strata\Journal\JournalOp> | $operations | The operations, in sequence order. |
| array |
$payloads | Operation key keyed to the frame map that reconstructs its payload. An operation with no payload, such as a delete, has no entry. |
| int | $collapsedFrom | How many operations were captured before collapsing produced this set. |
| int | $rawBytes | Decoded payload bytes the operations describe. |
| int | $version | Manifest format version. |
When the sequence or time range is inverted, a count is negative, or a payload map names an operation the manifest does not carry.
fromArray(array$data) : self
Rebuilds a manifest from its serialized form.
| array |
$data | The array produced by SegmentManifest::jsonSerialize(). |
When the version is newer than this release understands, or the manifest is incoherent.
The manifest.