Packages

class RedisJournal extends AsyncWriteJournal

Stores events inside a redis database.

For each persistence id persistenceId, it creates two keys:

  • journal:persisted:persistenceId contains a sorted set of events (sorted by sequence number)
  • journal:persisted:persistenceId:highestSequenceNr contains the highest sequence number

For each tag t, it creates a key journal:tag:t which contains the ordered list of pair (sequenceNr, persistenceId). Order in this list is the order in which events with the given tag t were recorded.

It also maintains following keys:

  • journal:persistenceIds which is a set of persistence identifiers.
  • journal:tags which is the set of all tags.

Using the redis PubSub mechanism, this journal notifies whoever is interested on following channels:

  • journal:channel:ids any new persisted identifier is published
  • journal:channel:persisted:<id> anytime a new event is appended to a persistence id <id>, the sequenceNr is published
  • journal:channel:tags anytime a new event is appended to a tag, the tag name is published
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RedisJournal
  2. AsyncWriteJournal
  3. AsyncRecovery
  4. WriteJournalBase
  5. Actor
  6. AnyRef
  7. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new RedisJournal(conf: Config)

Type Members

  1. type Receive = PartialFunction[Any, Unit]
    Definition Classes
    Actor

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from RedisJournal to any2stringadd[RedisJournal] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (RedisJournal, B)
    Implicit
    This member is added by an implicit conversion from RedisJournal to ArrowAssoc[RedisJournal] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. def aroundPostRestart(reason: Throwable): Unit
    Attributes
    protected[akka]
    Definition Classes
    Actor
    Annotations
    @InternalApi()
  7. def aroundPostStop(): Unit
    Attributes
    protected[akka]
    Definition Classes
    Actor
    Annotations
    @InternalApi()
  8. def aroundPreRestart(reason: Throwable, message: Option[Any]): Unit
    Attributes
    protected[akka]
    Definition Classes
    Actor
    Annotations
    @InternalApi()
  9. def aroundPreStart(): Unit
    Attributes
    protected[akka]
    Definition Classes
    Actor
    Annotations
    @InternalApi()
  10. def aroundReceive(receive: actor.Actor.Receive, msg: Any): Unit
    Attributes
    protected[akka]
    Definition Classes
    Actor
    Annotations
    @InternalApi()
  11. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  12. def asyncDeleteMessagesTo(persistenceId: String, toSequenceNr: Long): Future[Unit]
    Definition Classes
    RedisJournal → AsyncWriteJournal
  13. def asyncReadHighestSequenceNr(persistenceId: String, fromSequenceNr: Long): Future[Long]
    Definition Classes
    RedisJournal → AsyncRecovery
  14. def asyncReplayMessages(persistenceId: String, fromSequenceNr: Long, toSequenceNr: Long, max: Long)(recoveryCallback: (PersistentRepr) ⇒ Unit): Future[Unit]
    Definition Classes
    RedisJournal → AsyncRecovery
  15. def asyncWriteMessages(messages: Seq[AtomicWrite]): Future[Seq[Try[Unit]]]
    Definition Classes
    RedisJournal → AsyncWriteJournal
  16. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate() @throws( ... )
  17. implicit val context: ActorContext
    Definition Classes
    Actor
  18. implicit def ec: ExecutionContextExecutor
  19. def ensuring(cond: (RedisJournal) ⇒ Boolean, msg: ⇒ Any): RedisJournal
    Implicit
    This member is added by an implicit conversion from RedisJournal to Ensuring[RedisJournal] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  20. def ensuring(cond: (RedisJournal) ⇒ Boolean): RedisJournal
    Implicit
    This member is added by an implicit conversion from RedisJournal to Ensuring[RedisJournal] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  21. def ensuring(cond: Boolean, msg: ⇒ Any): RedisJournal
    Implicit
    This member is added by an implicit conversion from RedisJournal to Ensuring[RedisJournal] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  22. def ensuring(cond: Boolean): RedisJournal
    Implicit
    This member is added by an implicit conversion from RedisJournal to Ensuring[RedisJournal] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  23. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  24. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  25. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from RedisJournal to StringFormat[RedisJournal] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  26. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  27. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  28. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  29. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  30. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  31. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  32. val persistence: Persistence
    Definition Classes
    WriteJournalBase
  33. def postRestart(reason: Throwable): Unit
    Definition Classes
    Actor
    Annotations
    @throws( classOf[java.lang.Exception] )
  34. def postStop(): Unit
    Definition Classes
    RedisJournal → Actor
  35. def preRestart(reason: Throwable, message: Option[Any]): Unit
    Definition Classes
    Actor
    Annotations
    @throws( classOf[java.lang.Exception] )
  36. def preStart(): Unit
    Definition Classes
    RedisJournal → Actor
  37. def preparePersistentBatch(rb: Seq[PersistentEnvelope]): Seq[AtomicWrite]
    Attributes
    protected
    Definition Classes
    WriteJournalBase
  38. final def receive: PartialFunction[Any, Unit]
    Definition Classes
    AsyncWriteJournal → Actor
  39. def receivePluginInternal: actor.Actor.Receive
    Definition Classes
    AsyncWriteJournal
  40. final val receiveWriteJournal: actor.Actor.Receive
    Definition Classes
    AsyncWriteJournal
  41. var redis: RedisClient
  42. implicit final val self: ActorRef
    Definition Classes
    Actor
  43. final def sender(): ActorRef
    Definition Classes
    Actor
  44. implicit val serialization: Serialization
  45. def supervisorStrategy: SupervisorStrategy
    Definition Classes
    Actor
  46. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  47. implicit def system: ActorSystem
  48. def toString(): String
    Definition Classes
    AnyRef → Any
  49. def unhandled(message: Any): Unit
    Definition Classes
    Actor
  50. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  51. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  52. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  53. def [B](y: B): (RedisJournal, B)
    Implicit
    This member is added by an implicit conversion from RedisJournal to ArrowAssoc[RedisJournal] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
  54. implicit object longFormatter extends ByteStringDeserializer[Long]

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from AsyncWriteJournal

Inherited from AsyncRecovery

Inherited from WriteJournalBase

Inherited from Actor

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from RedisJournal to any2stringadd[RedisJournal]

Inherited by implicit conversion StringFormat from RedisJournal to StringFormat[RedisJournal]

Inherited by implicit conversion Ensuring from RedisJournal to Ensuring[RedisJournal]

Inherited by implicit conversion ArrowAssoc from RedisJournal to ArrowAssoc[RedisJournal]

Ungrouped