$index
$index : int
One rung of the storage ladder: a bucket, an age band, and whether the copy below it survives.
Tier zero is where every write lands and where every ref lives. A tier above it holds history that has aged past its own threshold, and the only question that then matters is whether the nearer copy is kept:
retainBelow true makes the tier a replica. The nearer copy stays, so the near tier remains
complete and the far tier is a second copy of the same object under the same key. This is the
layered-safety configuration, and it is the one to use when several sites share a bucket.retainBelow false makes the tier a destination. The object moves, so history ends up split
across buckets and a read of that part of history reaches the far tier. This is the cheap
configuration: the object is stored once.Neither changes an object's address. A tier is where a key lives, never part of the key, so the same frame in two tiers is one object rather than a copy with a new name.
$target : \Drupal\strata\Tier\TierTarget
__construct(int $index, \Drupal\strata\Tier\TierTarget $target, int $fromAge = 0, bool $retainBelow = false) : mixed
Constructs a tier.
| int | $index | Position on the ladder, zero being the nearest. |
| \Drupal\strata\Tier\TierTarget | $target | Where this tier writes. |
| int | $fromAge | Seconds an object must have gone untouched before it belongs here. Zero for the nearest tier, which holds everything by definition. |
| bool | $retainBelow | TRUE to keep the copy in the tier below, making this a replica rather than a destination. |
When the index or the age is negative, or the nearest tier is given a non-zero age.
accepts(int $age) : bool
Whether an object of a given age has aged into this tier.
Says nothing about whether a colder tier also claims it; TierMap::forAge() answers that by taking the coldest tier that says yes.
| int | $age | Seconds since the object was last written. |
TRUE when the age has reached this tier's threshold.
fromSettings(array$row, int $index) : self
Builds a tier from one settings row.
| array |
$row | One entry of the |
| int | $index | Position on the ladder. |
When the row names no provider, or gives the nearest tier an age threshold.
The tier.