!per #17755 removes the saved callback in plugins and adds receive
This commit is contained in:
parent
541ac83b10
commit
2a5161ff6f
16 changed files with 238 additions and 141 deletions
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
package docs.persistence
|
||||
|
||||
import akka.actor.Actor.Receive
|
||||
import akka.actor.ActorSystem
|
||||
import akka.testkit.TestKit
|
||||
import com.typesafe.config._
|
||||
|
|
@ -132,15 +133,20 @@ class MyJournal extends AsyncWriteJournal {
|
|||
replayCallback: (PersistentRepr) => Unit): Future[Unit] = ???
|
||||
def asyncReadHighestSequenceNr(persistenceId: String,
|
||||
fromSequenceNr: Long): Future[Long] = ???
|
||||
|
||||
// optionally override:
|
||||
override def receivePluginInternal: Receive = super.receivePluginInternal
|
||||
}
|
||||
|
||||
class MySnapshotStore extends SnapshotStore {
|
||||
def loadAsync(persistenceId: String,
|
||||
criteria: SnapshotSelectionCriteria): Future[Option[SelectedSnapshot]] = ???
|
||||
def saveAsync(metadata: SnapshotMetadata, snapshot: Any): Future[Unit] = ???
|
||||
def saved(metadata: SnapshotMetadata): Unit = ???
|
||||
def deleteAsync(metadata: SnapshotMetadata): Future[Unit] = ???
|
||||
def deleteAsync(persistenceId: String, criteria: SnapshotSelectionCriteria): Future[Unit] = ???
|
||||
|
||||
// optionally override:
|
||||
override def receivePluginInternal: Receive = super.receivePluginInternal
|
||||
}
|
||||
|
||||
object PersistenceTCKDoc {
|
||||
|
|
|
|||
|
|
@ -395,9 +395,11 @@ saved snapshot matches the specified ``SnapshotSelectionCriteria`` will replay a
|
|||
Snapshot deletion
|
||||
-----------------
|
||||
|
||||
A persistent actor can delete individual snapshots by calling the ``deleteSnapshot`` method with the sequence number and the
|
||||
timestamp of a snapshot as argument. To bulk-delete snapshots matching ``SnapshotSelectionCriteria``, persistent actors should
|
||||
use the ``deleteSnapshots`` method.
|
||||
A persistent actor can delete individual snapshots by calling the ``deleteSnapshot`` method with the sequence number of
|
||||
when the snapshot was taken.
|
||||
|
||||
To bulk-delete a range of snapshots matching ``SnapshotSelectionCriteria``,
|
||||
persistent actors should use the ``deleteSnapshots`` method.
|
||||
|
||||
.. _at-least-once-delivery:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue