\Drupal\strata\Tier TierRequirementReport

Which buckets a restore needs, worked out before it starts.

The question an operator has to be able to answer at plan time is whether the cold bucket has to be up. Finding out halfway through a rollback - with some subjects written and the rest unreadable - is the outcome this exists to prevent.

Objects whose tier is not recorded are counted separately and never guessed at. While that count is above zero every tier is reported as possibly needed, because "it is in one of these buckets and I do not know which" is the true answer and narrowing it without evidence is the failure mode the whole design refuses.

Summary

Methods
Properties
Constants
__construct
names
unreachable
isSatisfiable
isPrecise
summary
jsonSerialize
target
tiers
objects
unplaced
bounded
problems
seconds
No public constants found
No protected methods found
No protected properties found
No protected constants found
No private methods found
No private properties found
No private constants found

Properties

$target

$target : string

Type

string

$tiers

$tiers : array

Type

array<string|int, mixed>

$objects

$objects : int

Type

int

$unplaced

$unplaced : int

Type

int

$bounded

$bounded : bool

Type

bool

$problems

$problems : array

Type

array<string|int, mixed>

$seconds

$seconds : float

Type

float

Methods

__construct()

__construct(string  $target, array  $tiers = [], int  $objects = 0, int  $unplaced = 0, bool  $bounded = false, list  $problems = [], float  $seconds = 0.0) : mixed

Constructs a report.

Parameters

string $target

Commit the restore would replay to.

array $tiers

Tier index keyed to its name, how many of the objects this restore needs are in it, whether it can be reached right now, and why not when it cannot.

int $objects

Objects the restore depends on.

int $unplaced

Objects whose tier is not recorded, so any tier may hold them.

bool $bounded

TRUE when the walk stopped early, either at its own limit or because every tier was already required and nothing more could change the answer.

list $problems

One line per object the walk could not resolve at all.

float $seconds

How long the walk took.

Returns

mixed —

names()

names() : list<string>

Tier names this restore needs.

Returns

list

Names, nearest first.

unreachable()

unreachable() : array<int,string>

Tiers this restore needs that cannot be reached right now.

Returns

array

Tier index keyed to the reason.

isSatisfiable()

isSatisfiable() : bool

Whether every bucket this restore needs can be reached.

Returns

bool —

TRUE when nothing stands in the way of starting.

isPrecise()

isPrecise() : bool

Whether the answer is as precise as it can be.

Returns

bool —

TRUE when every object this restore needs has a recorded tier.

summary()

summary() : string

A one-line summary for a log entry or a command's output.

Returns

string —

The summary.

jsonSerialize()

jsonSerialize() : array<string,mixed>

{@inheritdoc}

Returns

array

The report as a plain array.