Packages

package entity

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. Protected

Type Members

  1. trait Deployer extends AnyRef

    Deployer deploys event-sourced entity repositories by assembling required interpreters and components.

  2. trait DurableDeployer extends AnyRef

    DurableDeployer deploys durable entity repositories by assembling the required interpreters and components.

  3. trait DurableEntity[F[_], S] extends StateReader[F, S] with StateReaderHelpers[F, S] with StateWriter[F, S]

    DurableEntity[F, S] is the ability to read and write an entity state of type S together with the ability to compose such dependent effectful functions.

    DurableEntity[F, S] is the ability to read and write an entity state of type S together with the ability to compose such dependent effectful functions.

    These dual reader/writer abilities are what is needed to describe command handler behavior. This model enables a stateful entity to store the full state after processing each command instead of using event sourcing. When interpreting code involving DurableEntity, the final resulting value in the monadic chain is typically understood as the reply, and any written state is persisted behind the scenes by the runtime. Read always provides the state as it was last written.

    F

    context

    S

    state

    See also

    Entity for the event-sourcing equivalent

  4. trait Effector[F[_], S, Alg[_[_]]] extends StateReader[F, S] with Passivator[F] with Self[F, Alg]

    Effector represents the ability to read the state of the entity, perform a possible passivation side-effect and further interact with the entity itself via its algebra.

    Effector represents the ability to read the state of the entity, perform a possible passivation side-effect and further interact with the entity itself via its algebra.

    F

    context

    S

    state

  5. trait Entity[F[_], S, E] extends StateReader[F, S] with StateReaderHelpers[F, S] with EventWriter[F, E]

    Entity[F, S, E] is the ability to read an event-sourced entity state of type S and append events of type E affecting this state.

    Entity[F, S, E] is the ability to read an event-sourced entity state of type S and append events of type E affecting this state.

    These dual reader/writer abilities are what is needed to describe command handler behavior. When interpreting code involving Entity, the final resulting value in the monadic chain is typically understood as the reply, and all appended events are persisted to the journal atomically by the runtime. Read always provides the up-to-date state however, thanks to event folding happening within the interpreter, ensuring consistency throughout the chain.

    F

    context

    S

    state

    E

    event

    See also

    DurableEntity for the equivalent without event-sourcing

  6. trait EntityNameProvider[ID] extends () => String

    Function returning a name for an entity kind

    Function returning a name for an entity kind

    ID

    entity identifier type, used here to identify the entity kind

  7. trait Passivator[F[_]] extends AnyRef

    Passivator represents the ability to "passivate" an entity, i.e.

    Passivator represents the ability to "passivate" an entity, i.e. flush out an entity from the system temporarily

    F

    context

  8. trait Self[F[_], Alg[_[_]]] extends AnyRef

    Self represent the entity itself via its algebra

    Self represent the entity itself via its algebra

    F

    context

    Alg

    entity algebra

  9. trait Sharding[F[_], ID, Alg[_[_]]] extends AnyRef

    Sharding represents the ability to access a specific entity in the sharded cluster, via a handle of the entity algebra

    Sharding represents the ability to access a specific entity in the sharded cluster, via a handle of the entity algebra

    F

    context

    ID

    id

    Alg

    entity command handling algebra

  10. trait SideEffect[F[_], S, Alg[_[_]]] extends AnyRef

    SideEffect[F, S, Alg] represents a side-effect applied in context F.

    SideEffect[F, S, Alg] represents a side-effect applied in context F. The side-effect is triggered just after events persistence if any, or after some reads for a read-only command. Its is interpreted with Async in order to allow for asynchronous processes. The passed Effector can be used to access entity state and algebra and to control passivation.

    F

    effect type

    S

    entity state

    Alg

    entity algebra

  11. trait StateReader[F[_], S] extends AnyRef

    StateReader[F, S] is the ability to read a value of type S from a shared environment in context F, where that value is semantically understood as the current state of the entity.

    StateReader[F, S] is the ability to read a value of type S from a shared environment in context F, where that value is semantically understood as the current state of the entity.

    Note that this is equivalent to Ask[F, S] in cats mtl.

    F

    context

    S

    state

  12. trait StateReaderHelpers[F[_], S] extends StateReader[F, S]

    Set of convenience functions augmenting StateReader (that assume a Monad instance exists for F)

    Set of convenience functions augmenting StateReader (that assume a Monad instance exists for F)

    F

    context

    S

    state

  13. trait StateWriter[F[_], S] extends AnyRef

    StateWriter[F, S] is the ability to write a value of type S, where that value is semantically understood as the new state of the entity.

    StateWriter[F, S] is the ability to write a value of type S, where that value is semantically understood as the new state of the entity.

    F

    context

    S

    state

Value Members

  1. object Effector
  2. object Self
  3. object Sharding
  4. object SideEffect

Ungrouped