org.eligosource.eventsourced.core

EventsourcingExtension

class EventsourcingExtension extends Extension

Event-sourcing extension for Akka. Used by applications to create and register org.eligosource.eventsourced.core.Eventsourced processors and event message org.eligosource.eventsourced.core.Channels and to recover them from journaled event org.eligosource.eventsourced.core.Messages and, optionally, snapshots.

Linear Supertypes
Extension, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. EventsourcingExtension
  2. Extension
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new EventsourcingExtension(system: ExtendedActorSystem)

    system

    actor system this extension is associated with.

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 awaitProcessing(atMost: FiniteDuration): Unit

    Java API.

    Java API.

    Waits for all processors to finish processing of all pending messages in their mailboxes.

    atMost

    maximum duration to wait for processing to complete.

  8. def awaitProcessing(processorIds: Set[Integer], atMost: FiniteDuration): Unit

    Java API.

    Java API.

    Waits for specified processors to finish processing of all pending messages in their mailboxes.

    processorIds

    ids of registered processors to wait for. Default value is the set of all registered processor ids.

    atMost

    maximum duration to wait for processing to complete.

  9. def awaitProcessing(processorIds: Set[Int] = processors.keySet, atMost: FiniteDuration = 1 minute): Unit

    Waits for specified processors to finish processing of all pending messages in their mailboxes.

    Waits for specified processors to finish processing of all pending messages in their mailboxes.

    processorIds

    ids of registered processors to wait for. Default value is the set of all registered processor ids.

    atMost

    maximum duration to wait for processing to complete. Default value is 1 minute.

  10. def channelOf(props: ChannelProps)(implicit actorRefFactory: ActorRefFactory): ActorRef

    Creates and registers a org.eligosource.eventsourced.core.Channel.

    Creates and registers a org.eligosource.eventsourced.core.Channel. The channel is registered under the id specified by props.id. If props.name is defined it is also registered under that name.

    props

    channel configuration object.

    actorRefFactory

    org.eligosource.eventsourced.core.Channel ref factory.

    returns

    a channel ref.

    Exceptions thrown
    InvalidActorNameException

    if name is defined and already in use in the underlying actor system.

    InvalidChannelIdException

    if channel id < 1.

    See also

    org.eligosource.eventsourced.core.DefaultChannelProps org.eligosource.eventsourced.core.ReliableChannelProps

  11. def channels: Map[Int, ActorRef]

    Map of registered org.eligosource.eventsourced.core.Channels.

    Map of registered org.eligosource.eventsourced.core.Channels. Mapping key is the channel id.

  12. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  13. def completeProcessing(timeout: Timeout): Future[Any]

    Java API.

    Java API.

    Returns a Future that will be completed when all processors have finished processing all pending messages in their mailboxes.

  14. def completeProcessing(processorIds: Set[Integer], timeout: Timeout): Future[Any]

    Java API.

    Java API.

    Returns a Future that will be completed when specified processors have finished processing all pending messages in their mailboxes.

    processorIds

    ids of registered processors to wait for. Default value is the set of all registered processor ids.

  15. def completeProcessing(processorIds: Set[Int] = processors.keySet)(implicit timeout: Timeout): Future[Any]

    Returns a Future that will be completed when specified processors have finished processing all pending messages in their mailboxes.

    Returns a Future that will be completed when specified processors have finished processing all pending messages in their mailboxes.

    processorIds

    ids of registered processors to wait for. Default value is the set of all registered processor ids.

  16. def deliver(channels: List[ActorRef], timeout: Timeout): Future[Any]

    Java API.

    Java API.

    Activates the specified channels and starts delivery of pending messages.

  17. def deliver(channels: Seq[ActorRef])(implicit timeout: Timeout): Future[Any]

    Activates the specified channels and starts delivery of pending messages.

  18. def deliver(channelId: Int)(implicit timeout: Timeout): Future[Any]

    Activates the channel registered under channelId and starts delivery of pending messages.

  19. def deliver()(implicit timeout: Timeout): Future[Any]

    Activates all registered channels and starts delivery of pending messages.

  20. final def eq(arg0: AnyRef): Boolean

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

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  23. def getChannels: Map[Integer, ActorRef]

    Java API.

    Java API.

    Map of registered org.eligosource.eventsourced.core.Channels. Mapping key is the channel id.

  24. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  25. def getNamedChannels: Map[String, ActorRef]

    Java API.

    Java API.

    Map of registered named org.eligosource.eventsourced.core.Channels. Mapping key is the channel name.

  26. def getProcessors: Map[Integer, ActorRef]

    Java API.

    Java API.

    Map of registered org.eligosource.eventsourced.core.Eventsourced processors. Mapping key is the processor id.

  27. def getReplayParams: replayParams.type

    Java API.

    Java API.

    Predefined ReplayParams sequences to be used with methods replay or recover.

    See also

    org.eligosource.eventsourced.core.ReplayParams

  28. def hashCode(): Int

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

    Definition Classes
    Any
  30. def journal: ActorRef

    Journal for this extension.

  31. def namedChannels: Map[String, ActorRef]

    Map of registered named org.eligosource.eventsourced.core.Channels.

    Map of registered named org.eligosource.eventsourced.core.Channels. Mapping key is the channel name.

  32. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  35. def processorOf(props: Props, name: String, actorRefFactory: ActorRefFactory): ActorRef

    Java API.

    Java API.

    Registers an org.eligosource.eventsourced.core.Eventsourced processor with a specified actor name.

    This method obtains the id from the created processor with a blocking operation. Use the overloaded processorOf(ProcessorProps) method if you want to avoid blocking.

    props

    actor ref configuration object.

    name

    processor name.

    actorRefFactory

    org.eligosource.eventsourced.core.Eventsourced ref factory.

    returns

    a processor ref.

    Exceptions thrown
    InvalidActorNameException

    if name is defined and already in use in the underlying actor system.

    InvalidProcessorIdException

    if processor id < 1.

  36. def processorOf(props: Props, actorRefFactory: ActorRefFactory): ActorRef

    Java API.

    Java API.

    Registers an org.eligosource.eventsourced.core.Eventsourced processor with a generated actor name.

    This method obtains the id from the created processor with a blocking operation. Use the overloaded processorOf(ProcessorProps) method if you want to avoid blocking.

    props

    actor ref configuration object.

    actorRefFactory

    org.eligosource.eventsourced.core.Eventsourced ref factory.

    returns

    a processor ref.

    Exceptions thrown
    InvalidActorNameException

    if name is defined and already in use in the underlying actor system.

    InvalidProcessorIdException

    if processor id < 1.

  37. def processorOf(props: Props, name: Option[String] = None)(implicit actorRefFactory: ActorRefFactory): ActorRef

    Registers an org.eligosource.eventsourced.core.Eventsourced processor.

    Registers an org.eligosource.eventsourced.core.Eventsourced processor.

    This method obtains the id from the created processor with a blocking operation. Use the overloaded processorOf(ProcessorProps) method if you want to avoid blocking.

    props

    actor ref configuration object.

    name

    optional processor name. If None, a name is generated.

    actorRefFactory

    org.eligosource.eventsourced.core.Eventsourced ref factory.

    returns

    a processor ref.

    Exceptions thrown
    InvalidActorNameException

    if name is defined and already in use in the underlying actor system.

    InvalidProcessorIdException

    if processor id < 1.

  38. def processorOf(props: ProcessorProps)(implicit actorRefFactory: ActorRefFactory): ActorRef

    Registers an org.eligosource.eventsourced.core.Eventsourced processor.

    props

    processor configuration object.

    returns

    a processor ref.

    Exceptions thrown
    InvalidActorNameException

    if props.name is defined and already in use in the underlying actor system.

    InvalidProcessorIdException

    if processor id < 1.

    See also

    org.eligosource.eventsourced.core.ProcessorProps

  39. def processors: Map[Int, ActorRef]

    Map of registered org.eligosource.eventsourced.core.Eventsourced processors.

    Map of registered org.eligosource.eventsourced.core.Eventsourced processors. Mapping key is the processor id.

  40. def recover(params: List[ReplayParams], waitAtMost: FiniteDuration): Unit

    Java API.

    Java API.

    Recovers specified processors and all channels registered at this extension where

    • processor recovery is done by calling replay(params)
    • channel activation is done by calling deliver()

    Channel activation is only started after processor recovery successfully completed.

    This method waits for replayed messages being sent to specified processors (via !) and all channels being activated but does not wait for replayed input messages being processed. However, any new message sent to any of the specified processors, after this method successfully returned, will be processed after the replayed event messages.

    Clients that want to wait for replayed messages being processed should call the awaitProcessing method after this method successfully returned.

    params

    replay parameters passed to replay(params).

    waitAtMost

    wait for the specified duration for the replay to complete.

    Exceptions thrown
    TimeoutException

    if replay doesn't complete within the specified duration.

  41. def recover(params: Seq[ReplayParams], waitAtMost: FiniteDuration): Unit

    Recovers specified processors and all channels registered at this extension where

    Recovers specified processors and all channels registered at this extension where

    • processor recovery is done by calling replay(params)
    • channel activation is done by calling deliver()

    Channel activation is only started after processor recovery successfully completed.

    This method waits for replayed messages being sent to specified processors (via !) and all channels being activated but does not wait for replayed input messages being processed. However, any new message sent to any of the specified processors, after this method successfully returned, will be processed after the replayed event messages.

    Clients that want to wait for replayed messages being processed should call the awaitProcessing method after this method successfully returned.

    params

    replay parameters passed to replay(params).

    waitAtMost

    wait for the specified duration for the replay to complete.

    Exceptions thrown
    TimeoutException

    if replay doesn't complete within the specified duration.

  42. def recover(params: Seq[ReplayParams]): Unit

    Recovers specified processors and all channels registered at this extension where

    Recovers specified processors and all channels registered at this extension where

    • processor recovery is done by calling replay(params)
    • channel activation is done by calling deliver()

    Channel activation is only started after processor recovery successfully completed.

    This method waits for replayed messages being sent to specified processors (via !) and all channels being activated but does not wait for replayed input messages being processed. However, any new message sent to any of the specified processors, after this method successfully returned, will be processed after the replayed event messages.

    Clients that want to wait for replayed messages being processed should call the awaitProcessing method after this method successfully returned.

    params

    replay parameters passed to replay(params).

    Exceptions thrown
    TimeoutException

    if replay doesn't complete within 1 minute.

  43. def recover(): Unit

    Recovers all processors and all channels registered at this extension where

    Recovers all processors and all channels registered at this extension where

    • processor recovery is done by calling replay(params)
    • channel activation is done by calling deliver()

    Channel activation is only started after processor recovery successfully completed.

    This method waits for replayed messages being sent to all processors (via !) and all channels being activated but does not wait for replayed input messages being processed. However, any new message sent to any of the processors, after this method successfully returned, will be processed after the replayed event messages.

    Clients that want to wait for replayed messages being processed should call the awaitProcessing method after this method successfully returned.

    Exceptions thrown
    TimeoutException

    if replay doesn't complete within the specified duration (which defaults to 1 minute).

  44. def recover(waitAtMost: FiniteDuration): Unit

    Recovers all processors and all channels registered at this extension where

    Recovers all processors and all channels registered at this extension where

    • processor recovery is done by calling replay(params)
    • channel activation is done by calling deliver()

    Channel activation is only started after processor recovery successfully completed.

    This method waits for replayed messages being sent to all processors (via !) and all channels being activated but does not wait for replayed input messages being processed. However, any new message sent to any of the processors, after this method successfully returned, will be processed after the replayed event messages.

    Clients that want to wait for replayed messages being processed should call the awaitProcessing method after this method successfully returned.

    waitAtMost

    wait for the specified duration for the replay to complete.

    Exceptions thrown
    TimeoutException

    if replay doesn't complete within the specified duration.

  45. def replay(params: List[ReplayParams], timeout: Timeout): Future[Any]

    Java API.

    Java API.

    Replays input messages to specified processors, optionally based on a snapshot. The returned Future will be completed when the replayed messages have been sent (via !) to the specified processors. Any new message sent to any of the specified processors, after successful completion of the returned Future, will be processed after the replayed input messages.

    Clients that want to wait for replayed messages being processed should call the awaitProcessing method after the returned Future successfully completed.

    params

    sequence of processor-specific replay parameters.

    See also

    org.eligosource.eventsourced.core.ReplayParams

  46. def replay(params: Seq[ReplayParams])(implicit timeout: Timeout): Future[Any]

    Replays input messages to specified processors, optionally based on a snapshot.

    Replays input messages to specified processors, optionally based on a snapshot. The returned Future will be completed when the replayed messages have been sent (via !) to the specified processors. Any new message sent to any of the specified processors, after successful completion of the returned Future, will be processed after the replayed input messages.

    Clients that want to wait for replayed messages being processed should call the awaitProcessing method after the returned Future successfully completed.

    params

    sequence of processor-specific replay parameters.

    See also

    org.eligosource.eventsourced.core.ReplayParams

  47. object replayParams

    Predefined ReplayParams sequences to be used with methods replay or recover.

  48. def snapshot(processorIds: Set[Integer], timeout: Timeout): Future[Set[SnapshotSaved]]

    Java API.

    Java API.

    Requests a snapshot capturing action from specified processors. These processors will receive a org.eligosource.eventsourced.core.SnapshotRequest message which is used to capture a snapshot via that message's process method. Once captured, the snapshots will be saved. The future returned by this method will be completed, when all snapshots have been saved.

    Calling this method for a single processor is equivalent to sending that processor a SnapshotRequest.get message.

    processorIds

    ids of processors for which a snapshot capturing action shall be requested.

    timeout

    snapshot capturing and saving timeout.

  49. def snapshot(processorIds: Set[Int])(implicit timeout: Timeout): Future[Set[SnapshotSaved]]

    Requests a snapshot capturing action from specified processors.

    Requests a snapshot capturing action from specified processors. These processors will receive a org.eligosource.eventsourced.core.SnapshotRequest message which is used to capture a snapshot via that message's process method. Once captured, the snapshots will be saved. The future returned by this method will be completed, when all snapshots have been saved.

    Calling this method for a single processor is equivalent to sending that processor a org.eligosource.eventsourced.core.SnapshotRequest$ message.

    processorIds

    ids of processors for which a snapshot capturing action shall be requested.

    timeout

    snapshot capturing and saving timeout.

  50. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  51. def toString(): String

    Definition Classes
    AnyRef → Any
  52. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def recover(f: (Int) ⇒ Option[Long], waitAtMost: FiniteDuration): Unit

    Annotations
    @deprecated
    Deprecated

    (Since version 0.5) use recover(Seq[ReplayParams], FiniteDuration)

  2. def replay(f: (Int) ⇒ Option[Long])(implicit timeout: Timeout): Future[Any]

    Annotations
    @deprecated
    Deprecated

    (Since version 0.5) use replay(Seq[ReplayParams])(Timeout)

Inherited from Extension

Inherited from AnyRef

Inherited from Any

Ungrouped