$provider
$provider : ?\Drupal\strata\Storage\StorageProviderInterface
The storage provider, once resolved.
Assembles the pipeline from configuration.
Every part of the engine is independently constructible and independently tested; this is the one place that reads settings and decides which parts a given site gets.
Nothing is built until it is asked for, and each piece is built once. A request that captures but never flushes therefore never constructs a storage provider or a cipher.
$provider : ?\Drupal\strata\Storage\StorageProviderInterface
The storage provider, once resolved.
$tiers : ?\Drupal\strata\Tier\TieredProvider
The tiered router, once resolved, or NULL when the site writes to one bucket.
$providerStats : ?\Drupal\strata\Storage\ProviderStats
What the store has been asked to do this process.
Deliberately not cleared by Engine::reset(): a settings change does not un-issue the requests that were already made, and the same accumulator is handed to the provider built afterwards.
$tierStats : array
What each tier has been asked to do this process, keyed by tier name.
Not cleared by Engine::reset(), for the reason the total is not.
$placementIndex : ?\Drupal\strata\Tier\PlacementIndexInterface
The placement index, once built.
$providerStatStore : ?\Drupal\strata\Storage\ProviderStatStore
The per-day record of store traffic, once built.
$cipher : ?\Drupal\strata\Crypto\CipherInterface
The cipher, once resolved.
$codecs : ?\Drupal\strata\Codec\CodecRegistry
The codec registry, once built.
$store : ?\Drupal\strata\Cas\ObjectStore
The object store, once built.
$dictionaryStore : ?\Drupal\strata\Codec\Dictionary\DictionaryStore
The dictionary store, once built.
$telemetry : ?\Drupal\strata\Telemetry\OtlpExporter
The telemetry exporter, once built.
$tracer : ?\Drupal\strata\Telemetry\Tracer
The tracer, once built.
Held rather than rebuilt because spans accumulate in it, and a second tracer would start with an empty buffer and export half the request.
$keyspaceSources : list<\Drupal\strata\Capture\Classifier\KeyspaceSourceInterface>
Keyspace sources contributed by submodules.
$restoreStrategies : list<\Drupal\strata\Restore\RestoreStrategyInterface>
Restore strategies contributed by submodules.
$journal : \Drupal\strata\Journal\JournalInterface
$index : \Drupal\strata\Cas\FrameIndexInterface
$commitIndex : \Drupal\strata\Tree\CommitIndex
$ledger : \Drupal\strata\Health\HealthLedgerInterface
$lease : \Drupal\strata\Flush\Lease
$audit : \Drupal\strata\Restore\RestoreAudit
$scope : \Drupal\strata\Capture\CaptureScope
$classifications : \Drupal\strata\Capture\Classifier\ClassificationRegistry
$site : \Drupal\strata\Site\SiteContext
$notifier : \Drupal\strata\Event\Notifier
$providers : ?\Drupal\strata\Storage\StorageProviderManager
__construct(\Drupal\Core\Config\ConfigFactoryInterface $configFactory, \Drupal\strata\Journal\JournalInterface $journal, \Drupal\strata\Cas\FrameIndexInterface $index, \Drupal\strata\Tree\CommitIndex $commitIndex, \Drupal\strata\Health\HealthLedgerInterface $ledger, \Drupal\strata\Flush\Lease $lease, \Psr\Log\LoggerInterface $logger, \Drupal\strata\Restore\RestoreAudit $audit, \Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager, \Drupal\Core\State\StateInterface $state, \Drupal\Core\KeyValueStore\KeyValueFactoryInterface $keyValue, \Drupal\Core\Database\Connection $database, \Drupal\strata\Capture\CaptureScope $scope, \Drupal\strata\Capture\Classifier\ClassificationRegistry $classifications, \Drupal\strata\Site\SiteContext $site, \Drupal\Core\Session\AccountProxyInterface $currentUser, \Drupal\strata\Event\Notifier $notifier = new \Drupal\strata\Event\Notifier(), \Drupal\Component\Datetime\TimeInterface $time = new \Drupal\Component\Datetime\Time(), \Drupal\key\KeyRepositoryInterface|null $keys = null, \Drupal\strata\Storage\StorageProviderManager|null $providers = null, \GuzzleHttp\ClientInterface|null $http = null) : mixed
Constructs an engine.
| \Drupal\Core\Config\ConfigFactoryInterface | $configFactory | Where settings are read from. |
| \Drupal\strata\Journal\JournalInterface | $journal | The journal a flush drains. |
| \Drupal\strata\Cas\FrameIndexInterface | $index | The deduplication index. |
| \Drupal\strata\Tree\CommitIndex | $commitIndex | The local index over the commit log. |
| \Drupal\strata\Health\HealthLedgerInterface | $ledger | Where a verify pass records what it found. |
| \Drupal\strata\Flush\Lease | $lease | Keeps two flushes from overlapping. |
| \Psr\Log\LoggerInterface | $logger | Records what a flush did. |
| \Drupal\strata\Restore\RestoreAudit | $audit | Where a restore records who did what. |
| \Drupal\Core\Entity\EntityTypeManagerInterface | $entityTypeManager | Loads and saves the entities a logical restore writes into. |
| \Drupal\Core\State\StateInterface | $state | Where a logical restore writes state values back. |
| \Drupal\Core\KeyValueStore\KeyValueFactoryInterface | $keyValue | Where a logical restore writes key-value entries back. |
| \Drupal\Core\Database\Connection | $database | The database the reconciler inspects. |
| \Drupal\strata\Capture\CaptureScope | $scope | Decides which tables the reconciler watches. |
| \Drupal\strata\Capture\Classifier\ClassificationRegistry | $classifications | Holds what each part of the ephemeral keyspace has been decided to be. |
| \Drupal\strata\Site\SiteContext | $site | Which site's history this engine reads and writes, so several can share one bucket. |
| \Drupal\Core\Session\AccountProxyInterface | $currentUser | Attributes a restore to whoever ran it. |
| \Drupal\strata\Event\Notifier | $notifier | Announces what the pipeline did. |
| \Drupal\Component\Datetime\TimeInterface | $time | The clock an archive and a drill are stamped from. |
| \Drupal\key\KeyRepositoryInterface|null | $keys | Supplies the encryption key, or NULL when the key module is absent. |
| \Drupal\strata\Storage\StorageProviderManager|null | $providers | Providers contributed by submodules, or NULL to use only the built-in ones. |
| \GuzzleHttp\ClientInterface|null | $http | The client telemetry is exported with, or NULL to build one. |
tiers() : \Drupal\strata\Tier\TieredProvider|null
The tiered router, when the site spreads history across several buckets.
The router, or NULL when the site writes to one bucket. Built by Engine::provider(), so asking for it resolves the provider first.
tierMap() : \Drupal\strata\Tier\TierMap|null
The storage ladder from configuration.
When the configured ladder is not one this can honour - a repeated bucket, a threshold that does not increase, a tier naming no provider. Refused here rather than at the first flush.
The ladder, or NULL when tiering is off or fewer than two tiers are configured. One tier is what an untiered site already does, so it stays on the single-provider path.
providerStats() : \Drupal\strata\Storage\ProviderStats
What the store has been asked to do so far this process.
One accumulator per engine, shared by every part that reaches the store, so a flush and the verify that follows it appear on the same bill. Engine::persistProviderStats() moves it into ProviderStatStore, which is the only place the figures survive the process.
The accumulator.
persistProviderStats() : int
Moves this process's request counts into the per-day record and starts a new window.
Safe to call when nothing has touched the store: an empty accumulator writes no row, so a request that captured but never flushed costs no query. Called on terminate, so the figures a report reads include the flush that just happened rather than the one before it.
On a tiered store each tier is filed under its own name as well, which is what makes "the far buckets are barely touched" a figure an operator can read rather than a design claim. The total is still filed under the provider id, so a report that never heard of tiers keeps working.
How many operation rows were written.
budgetGuard() : \Drupal\strata\Budget\BudgetGuard
The guard that prices this site against the ceilings it set.
The guard, holding whichever ceilings are configured. Both zero means no ceiling, which the guard reports as the normal rung rather than as an error.
budgetAssessment(int $seconds = 2592000) : \Drupal\strata\Budget\BudgetAssessment
What a month of the traffic in a window would cost, and which rung that lands on.
The window comes out of the per-day stat table rather than from this process's accumulator, which holds only what this request has done. Storage is what the frame index says the store holds now.
The rung is held to budget.action: that setting is what the operator chose to happen at the
ceiling, and letting the measured rung exceed it would stop capture on a site that asked to
be warned.
| int | $seconds | How far back to read. Defaults to thirty days, which is the window the ceilings are set in. |
The reading.
cipher() : \Drupal\strata\Crypto\CipherInterface
The configured cipher.
A site with encryption on and no key configured is refused rather than silently storing plaintext. The bucket would look like a working backup and would not be one.
When encryption is on and no usable key is configured.
The cipher.
codecs() : \Drupal\strata\Codec\CodecRegistry
The codec registry, following the configured codec where this host can run it.
Availability is a property of the host and a host changes: a PHP rebuilt without ext-zstd, a
container image swapped, a move between two servers. CodecRegistry::prefer() refuses a codec
it cannot write frames with, which suits a form deciding whether a choice can be honoured; here
the raise would reach every report page and every flush at once. So a pinned codec the host
cannot run falls back to the write preference and records a finding. The store is unaffected
either way: every reader stays registered, so frames written under the old codec still decode.
The registry, holding every codec this release ships.
activeDictionary() : \Drupal\strata\Codec\Dictionary\DictionaryRef|null
The dictionary new frames are compressed against.
One dictionary per store rather than one per realm, because a frame is addressed by its content and a store that chose a dictionary per operation would compress the same bytes two ways and store them twice. The entity realm is the one that matters - it is the overwhelming majority of operations - so its dictionary is the one that is loaded.
The reference, or NULL when dictionaries are off, unsupported, or none has been trained.
keyspaceDiscovery() : \Drupal\strata\Capture\Classifier\KeyspaceDiscovery
A keyspace discovery pass over whatever sources are registered.
The database source is always present, since a site's default cache and key-value backends are
tables. Submodules add their own by tagging a service, so a site with strata_redis gets both.
The discovery pass.
addKeyspaceSource(\Drupal\strata\Capture\Classifier\KeyspaceSourceInterface $source) : void
Adds a keyspace source contributed by a submodule.
Collected from the container by tag, so a submodule contributes one without this class knowing what backends exist.
| \Drupal\strata\Capture\Classifier\KeyspaceSourceInterface | $source | The source. |
physicalRestore() : \Drupal\strata\Restore\PhysicalRestore
The physical restore, with the strategies this host can run.
Both shipped strategies are registered whether or not the driver supports them, because an operator asking why the swap is unavailable needs it listed with its reason rather than absent.
The restore.
projectRoot() : string
The directory the site's code and lockfiles live under.
Configured rather than derived. The docroot and the composer root are the same directory on
some installs and one level apart on the drupal/recommended-project layout, and guessing
wrong means walking the wrong tree - or walking vendor/ as if it were the site's own code.
The configured root, or Drupal's own root when nothing is configured.
mediaStore(\Drupal\strata\File\BlockSplitter|null $splitter = null) : \Drupal\strata\File\MediaStore
The block store file content is written to.
| \Drupal\strata\File\BlockSplitter|null | $splitter | The splitter to use, or NULL to build one from configuration. |
The store.
priceTable() : \Drupal\strata\Estimate\PriceTable
The price table for the configured provider.
A provider with no published prices falls back to the local table, which charges nothing. An add-on may register any provider id and a site may have none configured at all, and a cost graph that raised on either would take down the page an operator opens to find out what the store is costing them.
The table, or the local one when no table is shipped for the configured provider.
repairPass() : \Drupal\strata\Health\RepairPass
The repair pass over the open findings.
The two passes are handed over as closures rather than as objects, so asking what there is to
repair costs a query rather than an assembled store: both reindexer() and verifier() build
the provider and the cipher, and a site that has not chosen an encryption key cannot build
either. Nothing should have to be configured before Strata can say there is nothing to fix.
The pass.
buildTier(\Drupal\strata\Tier\Tier $tier) : \Drupal\strata\Storage\StorageProviderInterface
The provider one tier writes to, with its own request counter.
Counted twice on purpose. The inner accumulator is this tier's own bill, which is what makes a far tier's promise of few requests a measurement rather than a claim; the outer is the process total, which is what the budget guard and the telemetry pass read. Counting only the total would leave the per-tier figures estimated, and counting only per tier would leave the guard with nothing.
| \Drupal\strata\Tier\Tier | $tier | The tier. |
When the tier's provider is not registered, or cannot address its own location.
The provider.
buildProvider(string $id, \Drupal\strata\Tier\Tier|null $tier) : \Drupal\strata\Storage\StorageProviderInterface
One raw storage provider, optionally pointed at a tier's own location.
| string | $id | Provider id from configuration. |
| \Drupal\strata\Tier\Tier|null | $tier | The tier to build for, or NULL for the site's single configured destination. |
When the id is not registered, the local provider has no directory, or the tier names a location the provider's factory cannot address.
The provider.
relocated(string $id, \Drupal\strata\Tier\Tier $tier) : \Drupal\strata\Storage\StorageProviderInterface
A provider pointed at a tier's own bucket or directory.
A provider whose factory cannot take a second location is refused rather than quietly built at the first one. Two tiers sharing a bucket would make a move a delete and a replica a claim about durability that is not true, and the ladder's own validation cannot catch it because the locations differ on paper.
| string | $id | Provider id. |
| \Drupal\strata\Tier\Tier | $tier | The tier. |
When the provider cannot be pointed at the tier's location.
The provider.
reportLostCodec(string $pinned, \Drupal\strata\Codec\CodecRegistry $registry) : void
Says that the configured codec is gone and what is being written instead.
WARN rather than ERROR because severity picks the repair rung and everything at ERROR and above runs an unattended pass. Nothing automatic installs a PHP extension, and the store is not damaged: frames written under the old codec still read, and new ones are written under a codec that works.
| string | $pinned | The codec id configuration asks for. |
| \Drupal\strata\Codec\CodecRegistry | $registry | The registry as this host built it. |
circuitBreaker() : \Drupal\strata\Health\CircuitBreaker
The breaker that stops a repair rung retrying a fault that keeps failing.
Both dials are clamped rather than passed through. CircuitBreaker refuses a threshold below
one and a negative cooldown, the form's #min does not reach drush config:set, and the raise
would land inside a cron stage where it would take the rest of the run with it.
The breaker, configured as the site asked.
keyProvider() : \Drupal\strata\Crypto\KeyProviderInterface
The key the cipher seals with.
When no key is configured, the key module is absent, or the key is the wrong length.
A provider holding the configured key.
keyProviderFor(string $id) : \Drupal\strata\Crypto\KeyProviderInterface|null
One key from the key module, by its machine name.
A retired key that has already been deleted resolves to NULL rather than throwing, because a finished rotation is exactly the case where that happens and it must not stop the site reading its own history.
| string | $id | The key entity's machine name. |
The provider, or NULL when the key is absent or holds nothing.
localPath() : string
Where the local provider writes.
Returned as configured rather than resolved to a real path. LocalStorage uses plain file
functions, which route through any registered stream wrapper, so private://strata works
directly and so does the vfs:// root a kernel test runs in. Calling realpath() here would
reject both.
When no directory is configured.
The configured path.