PHP Trait Kraken\Channel\Record\ResponseRecordStorage

Datei anzeigen Open project: kraken-php/framework

Protected Properties

Property Type Description
$handledReps ResponseRecord[]
$handledRepsTimeout integer
$reps ResponseRecord[]

Protected Methods

Method Description
addResponse ( string $pid, ResponseRecord $response ) Add new ResponseRecord to storage.
createResponse ( string $pid, string $alias, float $timeout, float $timeoutIncrease = 1 ) : ResponseRecord Create ResponseRecord.
existsResponse ( $pid ) : boolean Check if ResponseRecord with given protocol ID exists.
expireResponses ( ) Expire unhandled ResponseRecords.
getResponse ( string $pid ) : ResponseRecord Return ResponseRecord if it exists or null if it does not exist.
resolveOrRejectResponse ( string $pid, $exception ) Mark ResponseRecord as handled if it exists that and has protocol ID equal to $pid.
unfinishedResponses ( ) : ResponseRecord[] Return all unhandled ResponseRecords in array form.

Method Details

addResponse() protected method

Add new ResponseRecord to storage.
protected addResponse ( string $pid, ResponseRecord $response )
$pid string
$response ResponseRecord

createResponse() protected method

Create ResponseRecord.
protected createResponse ( string $pid, string $alias, float $timeout, float $timeoutIncrease = 1 ) : ResponseRecord
$pid string
$alias string
$timeout float
$timeoutIncrease float
return ResponseRecord

existsResponse() protected method

Check if ResponseRecord with given protocol ID exists.
protected existsResponse ( $pid ) : boolean
$pid
return boolean

expireResponses() protected method

Expire unhandled ResponseRecords.
protected expireResponses ( )

getResponse() protected method

Return ResponseRecord if it exists or null if it does not exist.
protected getResponse ( string $pid ) : ResponseRecord
$pid string
return ResponseRecord

resolveOrRejectResponse() protected method

Mark ResponseRecord as handled if it exists that and has protocol ID equal to $pid.
protected resolveOrRejectResponse ( string $pid, $exception )
$pid string
$exception

unfinishedResponses() protected method

Return all unhandled ResponseRecords in array form.
protected unfinishedResponses ( ) : ResponseRecord[]
return ResponseRecord[]

Property Details

$handledReps protected_oe property

protected ResponseRecord[],Kraken\Channel\Record $handledReps
return ResponseRecord[]

$handledRepsTimeout protected_oe property

protected int $handledRepsTimeout
return integer

$reps protected_oe property

protected ResponseRecord[],Kraken\Channel\Record $reps
return ResponseRecord[]