TABLE
TABLE = 'strata_placement'
The table rows live in.
The placement index a site runs on.
One row per object per tier, keyed on both, so adding a replica is an insert rather than a read-modify-write over a packed column and two concurrent migrations cannot lose one another's copy.
Every row is derived from the buckets and is rebuilt by TierPlacementRebuilder, so an uninstall dropping the table costs the next read one probe per tier and nothing else.
get(string $key) : \Drupal\strata\Tier\Placement|null
Where one object is.
| string | $key | The object key. |
The placement, or NULL when nothing has been recorded for that key. NULL means unknown, not absent; Placement::isEmpty() is what says every tier was asked and none had it.
record(\Drupal\strata\Tier\Placement $placement) : \Drupal\strata\Tier\Placement
Replaces what is known about one object.
| \Drupal\strata\Tier\Placement | $placement | The placement. Tiers not named by it are removed, so this is how a rebuild writes an authoritative answer over a stale one. |
The stored placement.
place(string $key, int $tier, int $bytes = 0) : \Drupal\strata\Tier\Placement
Adds one tier to what is known about an object.
| string | $key | The object key. |
| int | $tier | Tier index that holds it. |
| int | $bytes | The object's size, or zero to keep whatever is recorded. |
The resulting placement.
displace(string $key, int $tier) : \Drupal\strata\Tier\Placement
Removes one tier from what is known about an object.
| string | $key | The object key. |
| int | $tier | Tier index that no longer holds it. |
The resulting placement, empty when that was the last tier holding it.
page(int $limit = 1000, int $offset = 0) : list<\Drupal\strata\Tier\Placement>
One page of every placement, in key order.
| int | $limit | Most placements to return. |
| int | $offset | Placements to skip. |
The page, empty once the offset is past the end.
statistics() : array{objects: int, copies: int, bytes: int}
How many distinct objects and rows are held.
Distinct object keys, total placements across every tier, and the byte total counted once per object rather than once per copy.