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 publishedjournal:channel:persisted:<id>
anytime a new event is appended to a persistence id<id>
, the sequenceNr is publishedjournal:channel:tags
anytime a new event is appended to a tag, the tag name is published
Linear Supertypes
Type Hierarchy
Ordering
- Alphabetic
- By Inheritance
Inherited
- RedisJournal
- AsyncWriteJournal
- AsyncRecovery
- WriteJournalBase
- Actor
- AnyRef
- Any
Implicitly
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
Visibility
- Public
- All
Instance Constructors
- new RedisJournal(conf: Config)
Type Members
-
type
Receive = PartialFunction[Any, Unit]
- Definition Classes
- Actor
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
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
-
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()
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
aroundPostRestart(reason: Throwable): Unit
- Attributes
- protected[akka]
- Definition Classes
- Actor
- Annotations
- @InternalApi()
-
def
aroundPostStop(): Unit
- Attributes
- protected[akka]
- Definition Classes
- Actor
- Annotations
- @InternalApi()
-
def
aroundPreRestart(reason: Throwable, message: Option[Any]): Unit
- Attributes
- protected[akka]
- Definition Classes
- Actor
- Annotations
- @InternalApi()
-
def
aroundPreStart(): Unit
- Attributes
- protected[akka]
- Definition Classes
- Actor
- Annotations
- @InternalApi()
-
def
aroundReceive(receive: actor.Actor.Receive, msg: Any): Unit
- Attributes
- protected[akka]
- Definition Classes
- Actor
- Annotations
- @InternalApi()
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
asyncDeleteMessagesTo(persistenceId: String, toSequenceNr: Long): Future[Unit]
- Definition Classes
- RedisJournal → AsyncWriteJournal
-
def
asyncReadHighestSequenceNr(persistenceId: String, fromSequenceNr: Long): Future[Long]
- Definition Classes
- RedisJournal → AsyncRecovery
-
def
asyncReplayMessages(persistenceId: String, fromSequenceNr: Long, toSequenceNr: Long, max: Long)(recoveryCallback: (PersistentRepr) ⇒ Unit): Future[Unit]
- Definition Classes
- RedisJournal → AsyncRecovery
-
def
asyncWriteMessages(messages: Seq[AtomicWrite]): Future[Seq[Try[Unit]]]
- Definition Classes
- RedisJournal → AsyncWriteJournal
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate() @throws( ... )
-
implicit
val
context: ActorContext
- Definition Classes
- Actor
- implicit def ec: ExecutionContextExecutor
-
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
-
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
-
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
-
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
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
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()
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
val
persistence: Persistence
- Definition Classes
- WriteJournalBase
-
def
postRestart(reason: Throwable): Unit
- Definition Classes
- Actor
- Annotations
- @throws( classOf[java.lang.Exception] )
-
def
postStop(): Unit
- Definition Classes
- RedisJournal → Actor
-
def
preRestart(reason: Throwable, message: Option[Any]): Unit
- Definition Classes
- Actor
- Annotations
- @throws( classOf[java.lang.Exception] )
-
def
preStart(): Unit
- Definition Classes
- RedisJournal → Actor
-
def
preparePersistentBatch(rb: Seq[PersistentEnvelope]): Seq[AtomicWrite]
- Attributes
- protected
- Definition Classes
- WriteJournalBase
-
final
def
receive: PartialFunction[Any, Unit]
- Definition Classes
- AsyncWriteJournal → Actor
-
def
receivePluginInternal: actor.Actor.Receive
- Definition Classes
- AsyncWriteJournal
-
final
val
receiveWriteJournal: actor.Actor.Receive
- Definition Classes
- AsyncWriteJournal
- var redis: RedisClient
-
implicit final
val
self: ActorRef
- Definition Classes
- Actor
-
final
def
sender(): ActorRef
- Definition Classes
- Actor
- implicit val serialization: Serialization
-
def
supervisorStrategy: SupervisorStrategy
- Definition Classes
- Actor
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- implicit def system: ActorSystem
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
unhandled(message: Any): Unit
- Definition Classes
- Actor
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
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
- implicit object longFormatter extends ByteStringDeserializer[Long]