class QueueProducerStateStore implements NonCopyableContext

Constants

private CONTEXT_KEY

Properties

protected QueueProducerState>|QueueProducerState> $statesByPayload
protected array<string, string> $payloadByUuid

Methods

current()

Return producer state for the current coroutine.

void
put(string $payload, QueueProducerState $state)

Retain state by exact payload with an optional framework-UUID fallback.

take(string $payload)

Take state correlated by the exact final encoded payload.

takeUuid(string $uuid)

Take state through the framework UUID after another finalizer rewrites the payload.

Details

at line 23
static QueueProducerStateStore current()

Return producer state for the current coroutine.

at line 40
void put(string $payload, QueueProducerState $state)

Retain state by exact payload with an optional framework-UUID fallback.

Parameters

string $payload
QueueProducerState $state

Return Value

void

at line 58
QueueProducerState|null take(string $payload)

Take state correlated by the exact final encoded payload.

Parameters

string $payload

Return Value

QueueProducerState|null

at line 89
QueueProducerState|null takeUuid(string $uuid)

Take state through the framework UUID after another finalizer rewrites the payload.

Parameters

string $uuid

Return Value

QueueProducerState|null