org.eligosource.eventsourced.core

Confirm

trait Confirm extends Actor

Stackable modification for actors that want to automatically confirm the receipt of an event org.eligosource.eventsourced.core.Message from a org.eligosource.eventsourced.core.Channel. If the modified actor's receive method successfully returns, this trait calls confirm(true) on the received event message. If receive throws an exception, this trait calls confirm(false) on the received event message and re-throws the exception. Usage example:

val myActor = system.actorOf(Props(new MyActor with Confirm))

class MyActor extends Actor {
  def receive = {
    case msg: Message => // ...
  }
}

This trait can also be used in combination with other stackable traits of the library (such as org.eligosource.eventsourced.core.Receiver, org.eligosource.eventsourced.core.Emitter or org.eligosource.eventsourced.core.Eventsourced), for example:

val myActor = system.actorOf(Props(new MyActor with Receiver with Confirm with Eventsourced { val id = ... } ))

class MyActor extends Actor {
  def receive = {
    case event => // ...
  }
}
Linear Supertypes
Actor, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Confirm
  2. Actor
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. type Receive = PartialFunction[Any, Unit]

    Definition Classes
    Actor

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. implicit val context: ActorContext

    Definition Classes
    Actor
  9. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  13. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  14. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  15. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  16. final def notify(): Unit

    Definition Classes
    AnyRef
  17. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  18. def postRestart(reason: Throwable): Unit

    Definition Classes
    Actor
    Annotations
    @throws( classOf[java.lang.Exception] )
  19. def postStop(): Unit

    Definition Classes
    Actor
    Annotations
    @throws( classOf[java.lang.Exception] )
  20. def preRestart(reason: Throwable, message: Option[Any]): Unit

    Definition Classes
    Actor
    Annotations
    @throws( classOf[java.lang.Exception] )
  21. def preStart(): Unit

    Definition Classes
    Actor
    Annotations
    @throws( classOf[java.lang.Exception] )
  22. def receive: PartialFunction[Any, Unit]

    Definition Classes
    Confirm → Actor
  23. implicit final val self: ActorRef

    Definition Classes
    Actor
  24. final def sender: ActorRef

    Definition Classes
    Actor
  25. def supervisorStrategy: SupervisorStrategy

    Definition Classes
    Actor
  26. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  27. def toString(): String

    Definition Classes
    AnyRef → Any
  28. def unhandled(message: Any): Unit

    Definition Classes
    Actor
  29. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Actor

Inherited from AnyRef

Inherited from Any

Ungrouped