endless.core.entity
Members list
Type members
Classlikes
Deployer
deploys event-sourced entity repositories by assembling required interpreters and components.
Deployer
deploys event-sourced entity repositories by assembling required interpreters and components.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
DurableDeployer
deploys durable entity repositories by assembling the required interpreters and components.
DurableDeployer
deploys durable entity repositories by assembling the required interpreters and components.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
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.
Type parameters
- F
-
context
- S
-
state
Attributes
- See also
-
Entity
for the event-sourcing equivalent - Supertypes
-
class Objecttrait Matchableclass AnyShow all
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.
Type parameters
- F
-
context
- S
-
state
Attributes
- Companion
- object
- Supertypes
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.
Type parameters
- E
-
event
- F
-
context
- S
-
state
Attributes
- See also
-
DurableEntity
for the equivalent without event-sourcing - Supertypes
-
class Objecttrait Matchableclass AnyShow all
- Known subtypes
-
Function returning a name for an entity kind
Function returning a name for an entity kind
Type parameters
- ID
-
entity identifier type, used here to identify the entity kind
Attributes
- Supertypes
-
trait () => Stringclass Objecttrait Matchableclass Any
Passivator
represents the ability to "passivate" an entity, i.e. flush out an entity from the system temporarily
Passivator
represents the ability to "passivate" an entity, i.e. flush out an entity from the system temporarily
Type parameters
- F
-
context
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
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
Type parameters
- Alg
-
entity command handling algebra
- F
-
context
- ID
-
id
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
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.
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.
Type parameters
- Alg
-
entity algebra
- F
-
effect type
- S
-
entity state
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Companion
- trait
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
SideEffect.type
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.
Type parameters
- F
-
context
- S
-
state
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
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
)
Type parameters
- F
-
context
- S
-
state
Attributes
- Supertypes
- Known subtypes
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.
Type parameters
- F
-
context
- S
-
state
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-