akka.persistence.journal
Interface AsyncWriteProxy

All Superinterfaces:
Actor, AsyncRecovery, AsyncWriteJournal, RequiresMessageQueue<DequeBasedMessageQueueSemantics>, Stash, StashSupport, UnrestrictedStash, WriteJournalBase
All Known Implementing Classes:
InmemJournal, SharedLeveldbJournal

public interface AsyncWriteProxy
extends AsyncWriteJournal, Stash

INTERNAL API.

A journal that delegates actual storage to a target actor. For testing only.


Nested Class Summary
static class AsyncWriteProxy.SetStore
           
static class AsyncWriteProxy.SetStore$
           
 
Nested classes/interfaces inherited from interface akka.persistence.journal.AsyncWriteJournal
AsyncWriteJournal.Desequenced, AsyncWriteJournal.Desequenced$, AsyncWriteJournal.Resequencer
 
Nested classes/interfaces inherited from interface akka.actor.Actor
Actor.emptyBehavior$
 
Method Summary
 scala.concurrent.Future<scala.runtime.BoxedUnit> asyncDeleteMessages(scala.collection.immutable.Seq<PersistentId> messageIds, boolean permanent)
          Plugin API: asynchronously deletes messages identified by messageIds from the journal.
 scala.concurrent.Future<scala.runtime.BoxedUnit> asyncDeleteMessagesTo(java.lang.String persistenceId, long toSequenceNr, boolean permanent)
          Plugin API: asynchronously deletes all persistent messages up to toSequenceNr (inclusive).
 scala.concurrent.Future<java.lang.Object> asyncReadHighestSequenceNr(java.lang.String persistenceId, long fromSequenceNr)
          Plugin API: asynchronously reads the highest stored sequence number for the given persistenceId.
 scala.concurrent.Future<scala.runtime.BoxedUnit> asyncReplayMessages(java.lang.String persistenceId, long fromSequenceNr, long toSequenceNr, long max, scala.Function1<PersistentRepr,scala.runtime.BoxedUnit> replayCallback)
          Plugin API: asynchronously replays persistent messages.
 scala.concurrent.Future<scala.runtime.BoxedUnit> asyncWriteConfirmations(scala.collection.immutable.Seq<PersistentConfirmation> confirmations)
          Plugin API: asynchronously writes a batch of delivery confirmations to the journal.
 scala.concurrent.Future<scala.runtime.BoxedUnit> asyncWriteMessages(scala.collection.immutable.Seq<PersistentRepr> messages)
          Plugin API: asynchronously writes a batch of persistent messages to the journal.
 scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> initialized()
           
 scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receive()
          This defines the initial actor behavior, it must return a partial function with the actor logic.
 ActorRef store()
           
 Timeout timeout()
           
 
Methods inherited from interface akka.persistence.journal.AsyncWriteJournal
extension, publish, resequencer, resequencerCounter
 
Methods inherited from interface akka.persistence.journal.WriteJournalBase
persistentPrepareWrite, preparePersistentBatch
 
Methods inherited from interface akka.actor.UnrestrictedStash
postStop, preRestart
 
Methods inherited from interface akka.actor.Actor
aroundPostRestart, aroundPostStop, aroundPreRestart, aroundPreStart, aroundReceive, context, postRestart, preStart, self, sender, supervisorStrategy, unhandled
 
Methods inherited from interface akka.actor.StashSupport
actorCell, capacity, clearStash, context, enqueueFirst, mailbox, prepend, self, stash, theStash, unstash, unstashAll, unstashAll
 

Method Detail

initialized

scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> initialized()

store

ActorRef store()

receive

scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receive()
Description copied from interface: Actor
This defines the initial actor behavior, it must return a partial function with the actor logic.

Specified by:
receive in interface Actor
Specified by:
receive in interface AsyncWriteJournal
Returns:
(undocumented)

timeout

Timeout timeout()

asyncWriteMessages

scala.concurrent.Future<scala.runtime.BoxedUnit> asyncWriteMessages(scala.collection.immutable.Seq<PersistentRepr> messages)
Description copied from interface: AsyncWriteJournal
Plugin API: asynchronously writes a batch of persistent messages to the journal. The batch write must be atomic i.e. either all persistent messages in the batch are written or none.

Specified by:
asyncWriteMessages in interface AsyncWriteJournal
Parameters:
messages - (undocumented)
Returns:
(undocumented)

asyncWriteConfirmations

scala.concurrent.Future<scala.runtime.BoxedUnit> asyncWriteConfirmations(scala.collection.immutable.Seq<PersistentConfirmation> confirmations)
Description copied from interface: AsyncWriteJournal
Plugin API: asynchronously writes a batch of delivery confirmations to the journal.

Specified by:
asyncWriteConfirmations in interface AsyncWriteJournal
Parameters:
confirmations - (undocumented)
Returns:
(undocumented)

asyncDeleteMessages

scala.concurrent.Future<scala.runtime.BoxedUnit> asyncDeleteMessages(scala.collection.immutable.Seq<PersistentId> messageIds,
                                                                     boolean permanent)
Description copied from interface: AsyncWriteJournal
Plugin API: asynchronously deletes messages identified by messageIds from the journal. If permanent is set to false, the persistent messages are marked as deleted, otherwise they are permanently deleted.

Specified by:
asyncDeleteMessages in interface AsyncWriteJournal
Parameters:
messageIds - (undocumented)
permanent - (undocumented)
Returns:
(undocumented)

asyncDeleteMessagesTo

scala.concurrent.Future<scala.runtime.BoxedUnit> asyncDeleteMessagesTo(java.lang.String persistenceId,
                                                                       long toSequenceNr,
                                                                       boolean permanent)
Description copied from interface: AsyncWriteJournal
Plugin API: asynchronously deletes all persistent messages up to toSequenceNr (inclusive). If permanent is set to false, the persistent messages are marked as deleted, otherwise they are permanently deleted.

Specified by:
asyncDeleteMessagesTo in interface AsyncWriteJournal
Parameters:
persistenceId - (undocumented)
toSequenceNr - (undocumented)
permanent - (undocumented)
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)
Description copied from interface: AsyncRecovery
Plugin API: asynchronously replays persistent messages. Implementations replay a message by calling replayCallback. The returned future must be completed when all messages (matching the sequence number bounds) have been replayed. The future must be completed with a failure if any of the persistent messages could not be replayed.

The replayCallback must also be called with messages that have been marked as deleted. In this case a replayed message's deleted method must return true.

The channel ids of delivery confirmations that are available for a replayed message must be contained in that message's confirms sequence.

Specified by:
asyncReplayMessages in interface AsyncRecovery
Parameters:
persistenceId - persistent actor id.
fromSequenceNr - sequence number where replay should start (inclusive).
toSequenceNr - sequence number where replay should end (inclusive).
max - maximum number of messages to be replayed.
replayCallback - called to replay a single message. Can be called from any thread.

Returns:
(undocumented)
See Also:
AsyncWriteJournal, SyncWriteJournal

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 given persistenceId.

Specified by:
asyncReadHighestSequenceNr in interface AsyncRecovery
Parameters:
persistenceId - persistent actor id.
fromSequenceNr - hint where to start searching for the highest sequence number.
Returns:
(undocumented)