akka.persistence
Class Persistent

java.lang.Object
  extended by akka.persistence.Persistent
Direct Known Subclasses:
ConfirmablePersistent

public abstract class Persistent
extends java.lang.Object

Persistent message.


Constructor Summary
Persistent()
           
 
Method Summary
static Persistent apply(java.lang.Object payload, scala.Option<Persistent> currentPersistentMessage)
          Creates a new persistent message, derived from an implicit current message.
static Persistent create(java.lang.Object payload)
          Java API: creates a new persistent message.
static Persistent create(java.lang.Object payload, Persistent currentPersistentMessage)
          Java API: creates a new persistent message, derived from the specified current message.
abstract  java.lang.Object payload()
          This persistent message's payload.
abstract  long sequenceNr()
          This persistent message's sequence number.
static scala.Option<scala.Tuple2<java.lang.Object,java.lang.Object>> unapply(Persistent persistent)
          Persistent extractor.
abstract  Persistent withPayload(java.lang.Object payload)
          Creates a new persistent message with the specified payload.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Persistent

public Persistent()
Method Detail

create

public static Persistent create(java.lang.Object payload)
Java API: creates a new persistent message. Must only be used outside processors.

Parameters:
payload - payload of new persistent message.

create

public static Persistent create(java.lang.Object payload,
                                Persistent currentPersistentMessage)
Java API: creates a new persistent message, derived from the specified current message. The current message can be obtained inside a Processor by calling getCurrentPersistentMessage().

Parameters:
payload - payload of new persistent message.
currentPersistentMessage - current persistent message.

apply

public static Persistent apply(java.lang.Object payload,
                               scala.Option<Persistent> currentPersistentMessage)
Creates a new persistent message, derived from an implicit current message. When used inside a Processor, this is the optional current Persistent message of that processor.

Parameters:
payload - payload of the new persistent message.
currentPersistentMessage - optional current persistent message, defaults to None.

unapply

public static scala.Option<scala.Tuple2<java.lang.Object,java.lang.Object>> unapply(Persistent persistent)
Persistent extractor.


payload

public abstract java.lang.Object payload()
This persistent message's payload.


sequenceNr

public abstract long sequenceNr()
This persistent message's sequence number.


withPayload

public abstract Persistent withPayload(java.lang.Object payload)
Creates a new persistent message with the specified payload.