InMemoryActivityInvocationCache
in package
implements
ActivityInvocationCacheInterface
FinalYes
Table of Contents
Interfaces
Properties
- $cache : array<non-empty-string, InvocationFailure|InvocationResult|InvocationResultQueue|InvocationMatched>
- $dataConverter : DataConverterInterface
Methods
- __construct() : mixed
- canHandle() : bool
- clear() : void
- execute() : PromiseInterface
- saveCompletion() : void
- saveCompletionWhen() : void
- saveConsecutiveCompletions() : void
- saveFailure() : void
Properties
$cache
private
array<non-empty-string, InvocationFailure|InvocationResult|InvocationResultQueue|InvocationMatched>
$cache
= []
$dataConverter
private
DataConverterInterface
$dataConverter
Methods
__construct()
public
__construct([DataConverterInterface|null $dataConverter = null ]) : mixed
Parameters
- $dataConverter : DataConverterInterface|null = null
canHandle()
public
canHandle(ServerRequestInterface $request) : bool
Parameters
- $request : ServerRequestInterface
Return values
boolclear()
public
clear() : void
execute()
public
execute(ServerRequestInterface $request) : PromiseInterface
Parameters
- $request : ServerRequestInterface
Return values
PromiseInterfacesaveCompletion()
public
saveCompletion(string $activityMethodName, mixed $value) : void
Parameters
- $activityMethodName : string
- $value : mixed
-
Activity result: anything the DataConverter can encode, or an EncodedValues.
saveCompletionWhen()
public
saveCompletionWhen(string $activityMethodName, array<string|int, mixed> $args, mixed $value) : void
Parameters
- $activityMethodName : string
- $args : array<string|int, mixed>
-
Call arguments to byte-match against, encoded via the DataConverter.
- $value : mixed
-
Result returned on a match: anything the DataConverter can encode, or an EncodedValues.
saveConsecutiveCompletions()
public
saveConsecutiveCompletions(string $activityMethodName, array<string|int, mixed> $values) : void
Parameters
- $activityMethodName : string
- $values : array<string|int, mixed>
-
Per-call results, each anything the DataConverter can encode.
saveFailure()
public
saveFailure(string $activityMethodName, Throwable $error) : void
Parameters
- $activityMethodName : string
- $error : Throwable