akka.persistence
Class RequestReader

java.lang.Object
  extended by akka.persistence.RequestReader
All Implemented Interfaces:
Actor, Stash, StashFactory, StashSupport, UnrestrictedStash, RequiresMessageQueue<DequeBasedMessageQueueSemantics>, Recovery, Snapshotter

public class RequestReader
extends java.lang.Object
implements Actor, Recovery

Reads Deliver requests from the journal and processes them. The number of Deliver requests processed per iteration depends on

- pendingConfirmationsMax parameter in PersistentChannelSettings - pendingConfirmationsMin parameter in PersistentChannelSettings and the - current number of pending confirmations.

See Also:
PersistentChannel

Nested Class Summary
 
Nested classes/interfaces inherited from interface akka.persistence.Recovery
Recovery.State
 
Nested classes/interfaces inherited from interface akka.actor.Actor
Actor.emptyBehavior$
 
Constructor Summary
RequestReader(java.lang.String channelId, PersistentChannelSettings channelSettings)
           
 
Method Summary
 void onReplayFailure(scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receive, boolean await, java.lang.Throwable cause)
          INTERNAL API.
 void onReplaySuccess(scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receive, boolean await)
          INTERNAL API.
 java.lang.String persistenceId()
          Id of the persistent entity for which messages should be replayed.
 void preRestart(java.lang.Throwable reason, scala.Option<java.lang.Object> message)
          User overridable callback: '''By default it disposes of all children and then calls postStop().'''
 void preStart()
          User overridable callback.
 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.
 java.lang.String snapshotterId()
          Snapshotter id.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface akka.persistence.Recovery
_currentPersistent, _currentState, _lastSequenceNr, _recoveryFailureCause, _recoveryFailureMessage, aroundReceive, currentPersistentMessage, extension, getCurrentPersistentMessage, journal, lastSequenceNr, prepareRestart, processorId, receiverStash, recoveryPending, recoveryStarted, replayFailed, replayStarted, runReceive, snapshotSequenceNr, updateLastSequenceNr, updateLastSequenceNr, withCurrentPersistent
 
Methods inherited from interface akka.persistence.Snapshotter
deleteSnapshot, deleteSnapshots, loadSnapshot, saveSnapshot, snapshotStore
 
Methods inherited from interface akka.actor.UnrestrictedStash
postStop
 
Methods inherited from interface akka.actor.Actor
aroundPostRestart, aroundPostStop, aroundPreRestart, aroundPreStart, context, postRestart, self, sender, supervisorStrategy, unhandled
 
Methods inherited from interface akka.actor.StashSupport
actorCell, capacity, clearStash, context, enqueueFirst, mailbox, prepend, self, stash, theStash, unstash, unstashAll, unstashAll
 
Methods inherited from interface akka.actor.StashFactory
createStash
 

Constructor Detail

RequestReader

public RequestReader(java.lang.String channelId,
                     PersistentChannelSettings channelSettings)
Method Detail

receive

public 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
Returns:
(undocumented)

onReplaySuccess

public void onReplaySuccess(scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receive,
                            boolean await)
Description copied from interface: Recovery
INTERNAL API.

Called whenever a message replay succeeds.

Specified by:
onReplaySuccess in interface Recovery
Parameters:
receive - the actor's current behavior.
await - awaitReplay value of the calling replayStarted state.

onReplayFailure

public void onReplayFailure(scala.PartialFunction<java.lang.Object,scala.runtime.BoxedUnit> receive,
                            boolean await,
                            java.lang.Throwable cause)
Description copied from interface: Recovery
INTERNAL API.

Called whenever a message replay fails.

Specified by:
onReplayFailure in interface Recovery
Parameters:
receive - the actor's current behavior.
await - awaitReplay value of the calling replayStarted state.
cause - failure cause.

persistenceId

public java.lang.String persistenceId()
Description copied from interface: Recovery
Id of the persistent entity for which messages should be replayed.

Specified by:
persistenceId in interface Recovery
Returns:
(undocumented)

snapshotterId

public java.lang.String snapshotterId()
Description copied from interface: Snapshotter
Snapshotter id.

Specified by:
snapshotterId in interface Snapshotter
Returns:
(undocumented)

preRestart

public void preRestart(java.lang.Throwable reason,
                       scala.Option<java.lang.Object> message)
Description copied from interface: Actor
User overridable callback: '''By default it disposes of all children and then calls postStop().'''

Specified by:
preRestart in interface Actor
Specified by:
preRestart in interface UnrestrictedStash
Parameters:
reason - the Throwable that caused the restart to happen
message - optionally the current message the actor processed when failing, if applicable

Is called on a crashed Actor right BEFORE it is restarted to allow clean up of resources before Actor is terminated.

preStart

public void preStart()
Description copied from interface: Actor
User overridable callback.

Is called when an Actor is started. Actors are automatically started asynchronously when created. Empty default implementation.

Specified by:
preStart in interface Actor