trait PotActionRetriable[A, P <: PotActionRetriable[A, P]] extends PotAction[A, P] with AsyncActionRetriable[A, P]

A retriable async action handler for Pot values. Combines the state and result of AsyncAction into a single Pot value.

A

Type of action result

P

Type of the actual action class

Linear Supertypes
AsyncActionRetriable[A, P], PotAction[A, P], AsyncAction[A, P], Action, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. PotActionRetriable
  2. AsyncActionRetriable
  3. PotAction
  4. AsyncAction
  5. Action
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def next(newValue: Pot[A], newRetryPolicy: RetryPolicy): P
  2. abstract def potResult: Pot[A]
    Definition Classes
    PotAction
  3. abstract def retryPolicy: RetryPolicy
    Definition Classes
    AsyncActionRetriable

Concrete Value Members

  1. implicit object PActionType extends ActionType[P]
    Definition Classes
    AsyncAction
  2. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  3. final def ##(): Int
    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  7. def effect[B](f: => Future[B])(success: (B) => A, failure: (Throwable) => Throwable = identity)(implicit ec: ExecutionContext): EffectSingle[P]

    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.

    f

    Future to wrap, passes using by-name (lazy evaluation)

    success

    Transformation function for success case

    failure

    Transformation function for failure case

    returns

    An Effect for running the provided Future

    Definition Classes
    AsyncAction
  8. def effectWithRetry[B](f: => Future[B])(success: (B) => A, failure: (Throwable) => Throwable = identity)(implicit ec: ExecutionContext): (RetryPolicy) => EffectSingle[P]

    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.

    f

    Future to wrap, passes using by-name (lazy evaluation)

    success

    Transformation function for success case

    failure

    Transformation function for failure case

    returns

    An Effect for running the provided Future

    Definition Classes
    AsyncActionRetriable
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  11. def failed(ex: Throwable, nextRetryPolicy: RetryPolicy = retryPolicy): P

    Moves this action to a failed state with the provided exception.

    Moves this action to a failed state with the provided exception.

    ex

    Exception describing the reason for failure

    nextRetryPolicy

    Updated retry policy

    Definition Classes
    AsyncActionRetriable
  12. def failed(ex: Throwable): P

    Moves this action to a failed state with the provided exception.

    Moves this action to a failed state with the provided exception.

    ex

    Reason for the failure.

    Definition Classes
    AsyncAction
  13. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  14. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  15. def handle[M](pf: PartialFunction[PotState, ActionResult[M]]): ActionResult[M]

    Handles the action using the supplied partial function matching current state.

    Handles the action using the supplied partial function matching current state.

    Definition Classes
    AsyncAction
  16. def handleWith[M, T](handler: ActionHandler[M, T], effectRetry: (RetryPolicy) => Effect)(f: (PotActionRetriable.this.type, ActionHandler[M, T], (RetryPolicy) => Effect) => ActionResult[M]): ActionResult[M]

    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.

    handler

    The current action handler instance.

    effectRetry

    Function taking current RetryPolicy and returning an effect that performs the requested async operation.

    f

    External handler function

    returns

    An action result

    Definition Classes
    AsyncActionRetriable
  17. def handleWith[M, T](handler: ActionHandler[M, T], effect: Effect)(f: (PotActionRetriable.this.type, ActionHandler[M, T], Effect) => ActionResult[M]): ActionResult[M]

    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.

    handler

    The current action handler instance.

    effect

    Effect that performs the requested async operation.

    f

    External handler function

    returns

    An action result

    Definition Classes
    AsyncAction
  18. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  19. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  20. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  21. def next(newState: PotState, newValue: Try[A], newRetryPolicy: RetryPolicy): P
  22. def next(newValue: Pot[A]): P
    Definition Classes
    PotActionRetriablePotAction
  23. def next(newState: PotState, newValue: Try[A]): P

    Moves the action to the next state.

    Moves the action to the next state.

    newState

    New state for the action

    newValue

    New value for the action

    returns

    A new instance of this action with updated state and value

    Definition Classes
    AsyncActionRetriableAsyncAction
  24. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  25. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  26. def pending: P

    Moves this action to pending state.

    Moves this action to pending state.

    Definition Classes
    AsyncAction
  27. def ready(a: A): P

    Moves this action to ready state with a result value.

    Moves this action to ready state with a result value.

    a

    Result for the action.

    Definition Classes
    AsyncAction
  28. def result: Try[A]
    Definition Classes
    PotActionAsyncAction
  29. def state: PotState
    Definition Classes
    PotActionAsyncAction
  30. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  31. def toString(): String
    Definition Classes
    AnyRef → Any
  32. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  33. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  34. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from AsyncActionRetriable[A, P]

Inherited from PotAction[A, P]

Inherited from AsyncAction[A, P]

Inherited from Action

Inherited from AnyRef

Inherited from Any

Ungrouped