$provider
$provider : \Drupal\strata\Storage\StorageProviderInterface
Reads segment manifests back out of the store.
The codec a segment was written with is read from the object's own plaintext header rather than from the store's current settings, so changing a setting never makes an existing segment unreadable and nothing depends on provider metadata. The object key is the associated data the body was sealed with.
$provider : \Drupal\strata\Storage\StorageProviderInterface
$codecs : \Drupal\strata\Codec\CodecRegistry
$cipher : \Drupal\strata\Crypto\CipherInterface
__construct(\Drupal\strata\Storage\StorageProviderInterface $provider, \Drupal\strata\Codec\CodecRegistry $codecs, \Drupal\strata\Crypto\CipherInterface $cipher) : mixed
Constructs a reader.
| \Drupal\strata\Storage\StorageProviderInterface | $provider | Where segments live. |
| \Drupal\strata\Codec\CodecRegistry | $codecs | Used to find the codec a segment was written with. |
| \Drupal\strata\Crypto\CipherInterface | $cipher | Opens the manifest. |
read(string $key) : \Drupal\strata\Segment\SegmentManifest
Reads one segment.
| string | $key | The object key the segment was written to. |
When the segment is absent, fails to open, does not match its recorded digest, or carries a format version this release cannot read.
The manifest.
keysBetween(int $fromSecond, int $toSecond, int $level = 0) : list<string>
Segment keys covering a time range at a level.
Filters on the key rather than by reading manifests, since the key carries the epoch second the segment starts at. A compaction pass over an hour therefore costs one listing.
| int | $fromSecond | Unix second to start at, inclusive. |
| int | $toSecond | Unix second to end at, inclusive. |
| int | $level | Compaction level. |
When the listing fails.
Object keys, oldest first.
split(string $key, string $stored) : array{0: string, 1: string, 2: string}
Splits a stored segment into its header fields and sealed body.
| string | $key | The object key, for error messages. |
| string | $stored | The stored bytes. |
When the header is absent, truncated, or names a format this release cannot read.
The codec id, the plaintext digest and the sealed body.