Package

io.funcqrs

interpreters

Permalink

package interpreters

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. interpreters
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Type Members

  1. class AsyncInterpreter[A <: AggregateLike] extends Interpreter[A, Future]

    Permalink

    An Interpreter with F[_] bounded to Future.

    An Interpreter with F[_] bounded to Future.

    All command handling are interpreted to Future of Events.

    A

    - an Aggregate type

  2. type Identity[T] = T

    Permalink

    Convenient type alias to make any identity instances well-kinded.

    Convenient type alias to make any identity instances well-kinded.

    This allow us to use plain values whenever we need higher-kind of one type parameter.

    For example:

    trait Handlers[F[_]] {
      def handleCommand(cmd:Command): F[Event]
    }
    
    // implementations of handler can define the type of F
    object TryHandler extends Handlers[Try] {
      def handleCommand(cmd:Command): Try[Event] = Try(someEvent())
    
      def someEvent() : Event = ...
    }
    
    object IdentityHandler extends Handlers[Identity] {
      // since Identity[Event] = Event, we can call someEvent() directly without wrapping it!
      def handleCommand(cmd:Command): Identity[Event] = someEvent()
    
      def someEvent() : Event = ...
    }
  3. class IdentityInterpreter[A <: AggregateLike] extends Interpreter[A, Identity]

    Permalink

    An Interpreter with F[_] bounded to Identity.

    An Interpreter with F[_] bounded to Identity.

    All command handling are interpreted to Identity of Events (ie: the pure value).

    Will block on any async operation defined by Behavior.

    This interpreter should be used for testing and / or for behaviors that preferably don't define any async operation.

    A

    - an Aggregate type

  4. abstract class Interpreter[A <: AggregateLike, F[_]] extends AggregateAliases

    Permalink

    Base Interpreter trait.

    Base Interpreter trait.

    Implementors must define which type F must be bound to.

  5. class TryInterpreter[A <: AggregateLike] extends Interpreter[A, Try]

    Permalink

    An Interpreter with F[_] bounded to Try.

    An Interpreter with F[_] bounded to Try.

    All command handling are interpreted to Try of Events.

    Will block on any async operation defined by Behavior.

    This interpreter should be used for testing and / or for behaviors that preferably don't define any async operation.

    A

    - an Aggregate type

Value Members

  1. object AsyncInterpreter

    Permalink
  2. object IdentityInterpreter

    Permalink
  3. object Monads

    Permalink

    Provides type-classes for map and flatMap over Identity, Try and Future

    Provides type-classes for map and flatMap over Identity, Try and Future

    This implementation does NOT pretend to sound. We only need an abstraction to map and flatMap over Identity, Try and Future in a unified way.

  4. object TryInterpreter

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped