Completion

A completion object that emits completion notifications either <i>succeeded</i> or <i>failed</i>.

package

Default

Methods

__construct

__construct() 

Cause the current thread to wait until this completion completes.<p/>

await( $arg0 = null) : void

If the current thread is interrupted, an exception will be thrown.

await()

Cause the current thread to wait until this completion completes with a configurable timeout.

If completion times out or the current thread is interrupted, an exception will be thrown.

param $timeoutMillis [integer] the timeout in milliseconds await($timeoutMillis)

Arguments

$arg0

integer

Cause the current thread to wait until this completion completes and succeeds.<p/>

awaitSuccess( $arg0 = null) : void

If the current thread is interrupted or the suite fails, an exception will be thrown.

awaitSuccess()

Cause the current thread to wait until this completion completes and succeeds with a configurable timeout.

If completion times out or the current thread is interrupted or the suite fails, an exception will be thrown.

param $timeoutMillis [integer] the timeout in milliseconds awaitSuccess($timeoutMillis)

Arguments

$arg0

integer

Completion handler to receive a completion signal when this completions completes.

handler( $arg0) : void

Arguments

$arg0

callable

isCompleted

isCompleted() : boolean

Response

boolean

true if this completion is completed

isFailed

isFailed() : boolean

Response

boolean

true if the this completion is completed and failed

isSucceeded

isSucceeded() : boolean

Response

boolean

true if this completion is completed and succeeded

Completes the future upon completion, otherwise fails it.

resolve( $arg0) : void

Arguments

$arg0

Future