Wraps a by-name future result into an effect using success and failure transformations.
Wraps a by-name future result into an effect using success and failure transformations.
Future to wrap, passes using by-name (lazy evaluation)
Transformation function for success case
Transformation function for failure case
An Effect
for running the provided Future
Wraps a by-name future result into an effect creator function, using success and failure transformations.
Wraps a by-name future result into an effect creator function, using success and failure transformations.
Future to wrap, passes using by-name (lazy evaluation)
Transformation function for success case
Transformation function for failure case
An Effect
for running the provided Future
Moves this action to a failed state with the provided exception.
Moves this action to a failed state with the provided exception.
Exception describing the reason for failure
Updated retry policy
Moves this action to a failed state with the provided exception.
Moves this action to a failed state with the provided exception.
Reason for the failure.
Handles the action using the supplied partial function matching current state.
Handles the action using the supplied partial function matching current state.
Handles the action using an external handler function.
Handles the action using an external handler function. The function is provided with instance of this
AsyncAction
, the ActionHandler
this action currently resides in and the provided update Effect
creator function. The reason why retry policy is provided to the effect creator is that in case of failure, the
updated retry policy can be passed on to the next effect instantiation.
The current action handler instance.
Function taking current RetryPolicy
and returning an effect that performs the requested
async operation.
External handler function
An action result
Handles the action using an external handler function.
Handles the action using an external handler function. The function is provided with instance of this
AsyncAction
, the ActionHandler
this action currently resides in and the provided update Effect
.
The current action handler instance.
Effect that performs the requested async operation.
External handler function
An action result
Moves the action to the next state.
Moves the action to the next state.
New state for the action
New value for the action
A new instance of this action with updated state and value
Moves this action to pending state.
Moves this action to pending state.
Moves this action to ready state with a result value.
Moves this action to ready state with a result value.
Result for the action.
A retriable version of
AsyncAction
. Implementation must define aretryPolicy
, which is also passed on in thenext
method.Type of action result
Type of the actual action class