Package akka.persistence.journal.leveldb
Interface LeveldbRecovery
-
- All Superinterfaces:
AsyncRecovery
- All Known Subinterfaces:
LeveldbStore
- All Known Implementing Classes:
LeveldbJournal
,SharedLeveldbStore
public interface LeveldbRecovery extends AsyncRecovery
INTERNAL API.LevelDB backed message replay and sequence number recovery.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description scala.concurrent.Future<java.lang.Object>
asyncReadHighestSequenceNr(java.lang.String persistenceId, long fromSequenceNr)
Plugin API: asynchronously reads the highest stored sequence number for the givenpersistenceId
.scala.concurrent.Future<scala.runtime.BoxedUnit>
asyncReplayMessages(java.lang.String persistenceId, long fromSequenceNr, long toSequenceNr, long max, scala.Function1<PersistentRepr,scala.runtime.BoxedUnit> replayCallback)
scala.concurrent.Future<scala.runtime.BoxedUnit>
asyncReplayTaggedMessages(java.lang.String tag, long fromSequenceNr, long toSequenceNr, long max, scala.Function1<LeveldbJournal.ReplayedTaggedMessage,scala.runtime.BoxedUnit> replayCallback)
long
readHighestSequenceNr(int persistenceId)
void
replayMessages(int persistenceId, long fromSequenceNr, long toSequenceNr, long max, scala.Function1<PersistentRepr,scala.runtime.BoxedUnit> replayCallback)
void
replayTaggedMessages(java.lang.String tag, int tagNid, long fromSequenceNr, long toSequenceNr, long max, scala.Function1<LeveldbJournal.ReplayedTaggedMessage,scala.runtime.BoxedUnit> replayCallback)
-
-
-
Method Detail
-
asyncReadHighestSequenceNr
scala.concurrent.Future<java.lang.Object> asyncReadHighestSequenceNr(java.lang.String persistenceId, long fromSequenceNr)
Description copied from interface:AsyncRecovery
Plugin API: asynchronously reads the highest stored sequence number for the givenpersistenceId
. The persistent actor will use the highest sequence number after recovery as the starting point when persisting new events. This sequence number is also used astoSequenceNr
in subsequent call toAsyncRecovery.asyncReplayMessages(java.lang.String, long, long, long, scala.Function1<akka.persistence.PersistentRepr, scala.runtime.BoxedUnit>)
unless the user has specified a lowertoSequenceNr
. Journal must maintain the highest sequence number and never decrease it.This call is protected with a circuit-breaker.
Please also note that requests for the highest sequence number may be made concurrently to writes executing for the same
persistenceId
, in particular it is possible that a restarting actor tries to recover before its outstanding writes have completed.- Specified by:
asyncReadHighestSequenceNr
in interfaceAsyncRecovery
- Parameters:
persistenceId
- persistent actor id.fromSequenceNr
- hint where to start searching for the highest sequence number. When a persistent actor is recovering thisfromSequenceNr
will be the sequence number of the used snapshot or0L
if no snapshot is used.- Returns:
- (undocumented)
-
asyncReplayMessages
scala.concurrent.Future<scala.runtime.BoxedUnit> asyncReplayMessages(java.lang.String persistenceId, long fromSequenceNr, long toSequenceNr, long max, scala.Function1<PersistentRepr,scala.runtime.BoxedUnit> replayCallback)
- Specified by:
asyncReplayMessages
in interfaceAsyncRecovery
-
asyncReplayTaggedMessages
scala.concurrent.Future<scala.runtime.BoxedUnit> asyncReplayTaggedMessages(java.lang.String tag, long fromSequenceNr, long toSequenceNr, long max, scala.Function1<LeveldbJournal.ReplayedTaggedMessage,scala.runtime.BoxedUnit> replayCallback)
-
readHighestSequenceNr
long readHighestSequenceNr(int persistenceId)
-
replayMessages
void replayMessages(int persistenceId, long fromSequenceNr, long toSequenceNr, long max, scala.Function1<PersistentRepr,scala.runtime.BoxedUnit> replayCallback)
-
replayTaggedMessages
void replayTaggedMessages(java.lang.String tag, int tagNid, long fromSequenceNr, long toSequenceNr, long max, scala.Function1<LeveldbJournal.ReplayedTaggedMessage,scala.runtime.BoxedUnit> replayCallback)
-
-