package data
- Alphabetic
- Public
- All
Type Members
-
trait
AsyncAction[A, P <: AsyncAction[A, P]] extends Action
Base trait for asynchronous actions.
Base trait for asynchronous actions. Provides support for handling of multi-state actions. Implementation classes must implement
result
,next
andstate
functions. If you are usingPot
, consider usingPotAction
instead.Example:
case class MyAction( state: PotState = PotState.PotEmpty, result: Try[String] = Failure(new AsyncAction.PendingException)) extends AsyncAction[Int, MyAction] { def next(newState: PotState, newValue: Try[String]) = MyAction(newState, newValue) }
- A
Type of action result
- P
Type of the actual action class
-
trait
AsyncActionRetriable[A, P <: AsyncActionRetriable[A, P]] extends AsyncAction[A, P]
A retriable version of
AsyncAction
.A retriable version of
AsyncAction
. Implementation must define aretryPolicy
, which is also passed on in thenext
method.- A
Type of action result
- P
Type of the actual action class
- final case class Failed(exception: Throwable) extends Pot[Nothing] with FailedBase with Product with Serializable
- sealed trait FailedBase extends AnyRef
- final case class FailedStale[+A](x: A, exception: Throwable) extends Pot[A] with FailedBase with Product with Serializable
-
trait
Fetch[K] extends AnyRef
Provides methods to asynchronously fetch value(s) based on key(s)
- final case class Pending(startTime: Long = Pot.currentTime) extends Pot[Nothing] with PendingBase with Product with Serializable
- sealed trait PendingBase extends AnyRef
- final case class PendingStale[+A](x: A, startTime: Long = Pot.currentTime) extends Pot[A] with PendingBase with Product with Serializable
-
sealed abstract
class
Pot[+A] extends Product with Serializable
Represents a potential value that may be in different states.
-
trait
PotAction[A, P <: PotAction[A, P]] extends AsyncAction[A, P]
An async action handler for
Pot
values.An async action handler for
Pot
values. Combines the state and result ofAsyncAction
into a singlePot
value.- A
Type of action result
- P
Type of the actual action class
- See also
-
trait
PotActionRetriable[A, P <: PotActionRetriable[A, P]] extends PotAction[A, P] with AsyncActionRetriable[A, P]
A retriable async action handler for
Pot
values.A retriable async action handler for
Pot
values. Combines the state and result ofAsyncAction
into a singlePot
value.- A
Type of action result
- P
Type of the actual action class
-
trait
PotCollection[K, V] extends AnyRef
Trait defining common functionality for all potential collections.
Trait defining common functionality for all potential collections. All values inside the collection are wrapped in
Pot[V]
- K
Type of the key
- V
Type of the potential value
- class PotMap[K, V] extends PotCollection[K, V]
- sealed trait PotState extends AnyRef
- class PotStream[K, V] extends AnyRef
- class PotVector[V] extends PotCollection[Int, V]
- final case class Ready[+A](x: A) extends Pot[A] with Product with Serializable
-
class
RefTo[V] extends AnyRef
Provides a reference to a value elsewhere in the model.
- final case class StreamValue[K, V](key: K, value: V, stream: PotStream[K, V], prevKey: Option[K] = None, nextKey: Option[K] = None) extends Product with Serializable
Value Members
- object AsyncAction
- object AsyncActionRetriable
- object Empty extends Pot[Nothing] with Product with Serializable
- object Pot extends Serializable
- object PotAction
- object PotActionRetriable
- object PotMap
- object PotState
- object PotStream
- object PotVector
- object RefTo
- object Unavailable extends Pot[Nothing] with Product with Serializable