per #15423 Remove deprecated features from akka-persistence
* remove channels * remove View * remove Processor * collapse the complicated internal state management that was spread out between Processor, Eventsourced and Recovery * remove Recovery trait, this caused some duplication between Eventsourced and PersistentView, but but the enhanced PersistentView will not be based on recovery infrastructure, and therefore PersistentView code will be replaced anyway * remove PersistentBatch * remove LoopMessage * remove deleteMessages of individual messages * remove Persistent, PersistentRepr and PersistentImpl are kept * remove processorId * update doc sample code * note in migration guide about persistenceId * rename Resequencable to PersistentEnvelope
This commit is contained in:
parent
86a5b3d9d7
commit
c566d5a106
84 changed files with 2162 additions and 9560 deletions
|
|
@ -11,13 +11,17 @@ import akka.actor.{ ActorInitializationException, Props, ActorRef }
|
|||
object SnapshotDirectoryFailureSpec {
|
||||
val inUseSnapshotPath = "target/inUseSnapshotPath"
|
||||
|
||||
class TestProcessor(name: String, probe: ActorRef) extends Processor {
|
||||
class TestPersistentActor(name: String, probe: ActorRef) extends PersistentActor {
|
||||
|
||||
override def persistenceId: String = name
|
||||
|
||||
override def preStart(): Unit = ()
|
||||
|
||||
def receive = {
|
||||
override def receiveRecover: Receive = {
|
||||
case SnapshotOffer(md, s) ⇒ probe ! ((md, s))
|
||||
}
|
||||
|
||||
override def receiveCommand = {
|
||||
case s: String ⇒ saveSnapshot(s)
|
||||
case SaveSnapshotSuccess(md) ⇒ probe ! md.sequenceNr
|
||||
case other ⇒ probe ! other
|
||||
|
|
@ -27,8 +31,8 @@ object SnapshotDirectoryFailureSpec {
|
|||
|
||||
class SnapshotDirectoryFailureSpec extends AkkaSpec(PersistenceSpec.config("leveldb", "SnapshotDirectoryFailureSpec", extraConfig = Some(
|
||||
s"""
|
||||
|akka.persistence.snapshot-store.local.dir = "${SnapshotDirectoryFailureSpec.inUseSnapshotPath}"
|
||||
""".stripMargin))) with ImplicitSender {
|
||||
akka.persistence.snapshot-store.local.dir = "${SnapshotDirectoryFailureSpec.inUseSnapshotPath}"
|
||||
"""))) with ImplicitSender {
|
||||
|
||||
import SnapshotDirectoryFailureSpec._
|
||||
|
||||
|
|
@ -45,8 +49,8 @@ class SnapshotDirectoryFailureSpec extends AkkaSpec(PersistenceSpec.config("leve
|
|||
"A local snapshot store configured with an failing directory name " must {
|
||||
"throw an exception at startup" in {
|
||||
EventFilter[ActorInitializationException](occurrences = 1).intercept {
|
||||
val processor = system.actorOf(Props(classOf[TestProcessor], "SnapshotDirectoryFailureSpec-1", testActor))
|
||||
processor ! "blahonga"
|
||||
val p = system.actorOf(Props(classOf[TestPersistentActor], "SnapshotDirectoryFailureSpec-1", testActor))
|
||||
p ! "blahonga"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue