\Drupal\strata\Flush FlushResult

What one flush did.

Returned rather than logged so a caller decides what to report: cron logs it, Drush prints it, and the settings form shows the last one.

Summary

Methods
Properties
Constants
__construct
skipped
collapsed
summary
jsonSerialize
ran
reason
segment
commit
captured
stored
rawBytes
trimmed
seconds
skipped
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

$ran

$ran : bool

Type

bool

$reason

$reason : ?string

Type

string|null

$segment

$segment : ?string

Type

string|null

$commit

$commit : ?string

Type

string|null

$captured

$captured : int

Type

int

$stored

$stored : int

Type

int

$rawBytes

$rawBytes : int

Type

int

$trimmed

$trimmed : int

Type

int

$seconds

$seconds : float

Type

float

$skipped

$skipped : ?string

Type

string|null

Methods

__construct()

__construct(bool  $ran, string|null  $reason = null, string|null  $segment = null, string|null  $commit = null, int  $captured = 0, int  $stored = 0, int  $rawBytes = 0, int  $trimmed = 0, float  $seconds = 0.0, string|null  $skipped = null) : mixed

Constructs a result.

Parameters

bool $ran

Whether a segment was written. FALSE when nothing was pending or no bound had been reached.

string|null $reason

Which flush bound fired, or NULL when none did.

string|null $segment

Object key of the segment written, or NULL when none was.

string|null $commit

Id of the commit appended, or NULL when none was.

int $captured

Operations read out of the journal.

int $stored

Operations that survived collapsing.

int $rawBytes

Decoded payload bytes the operations described.

int $trimmed

Journal rows removed once the segment was sealed.

float $seconds

Wall-clock time the flush took.

string|null $skipped

Why the flush did not run, or NULL when it did.

Returns

mixed —

skipped()

skipped(string  $skipped) : self

A result for a flush that did not run.

Parameters

string $skipped

Why it did not run.

Returns

self —

The result.

collapsed()

collapsed() : int

How many operations collapsing removed.

Returns

int —

Operations dropped, never below zero.

summary()

summary() : string

A one-line summary for a log or a status page.

Returns

string —

Something such as "sealed 42 operations into 1 segment in 0.31s (age)".

jsonSerialize()

jsonSerialize() : array<string,mixed>

{@inheritdoc}

Returns

array

The result as a plain array.