CachingProcessor implements Processor
Read onlyYes
FinalYes
An existing cache id passes data through unchanged.
Interfaces
- Processor
- Unlike a Transformer, receives the whole upstream generator, not one batch.
Properties
- $cache : RowsStorage
- $id : string
- $idGiven : bool
Methods
- __construct() : mixed
- bind() : BoundStep<string|int, Processor>
- breaks() : bool
- True when process() needs every input row before it emits one: the processor ends its pipeline.
- describe() : null|Description
- fromDescription() : static
- process() : Generator<Signal|null, void>
- Process a stream of Rows and return a new stream.
Properties
$cache
public
RowsStorage
$cache
$id
public
string
$id
$idGiven
public
bool
$idGiven
= true
Methods
__construct()
public
__construct(string $id, RowsStorage $cache[, bool $idGiven = true ]) : mixed
Parameters
- $id : string
- $cache : RowsStorage
- $idGiven : bool = true
-
false when the id is the run config's: explain prints only a given id, so it stays reproducible
bind()
public
bind(Schema $input) : BoundStep<string|int, Processor>
Parameters
- $input : Schema
Return values
BoundStep<string|int, Processor>breaks()
True when process() needs every input row before it emits one: the processor ends its pipeline.
public
breaks() : bool
Return values
booldescribe()
public
describe() : null|Description
Return values
null|Description —null when this instance cannot cross a process boundary (a live client, a custom collaborator)
fromDescription()
public
static fromDescription(array<string|int, mixed> $data, Rebuild $rebuild) : static
Parameters
- $data : array<string|int, mixed>
- $rebuild : Rebuild
Return values
staticprocess()
Process a stream of Rows and return a new stream.
public
process(Generator<int, Rows> $rows, Backend $backend) : Generator<Signal|null, void>