!per #15230 rename processorId => persistentId
* This is NOT binary compatible, we're in an *experimental* module. * disabled binary compat checks for package akka.persistence * Source compatibility is retained, but users should migrate do the new method name ASAP. * Plugin APIs were migrated in a way that allows the old plugins to compile agains 2.3.4 without having to change anything. Hopefuly this will help authors migrate to 2.3.4 sooner. This is only source level compatible, not binary compatible. * added deprecation warnings on all processorId methods and provided bridges where possible * for users, the migration should be painless, they can still override the old method, and it'll work. But we encourage them to move to persistenceId; All delegation code will have to be removed afterwards ofc. Conflicts: akka-persistence/src/main/scala/akka/persistence/Channel.scala akka-persistence/src/main/scala/akka/persistence/JournalProtocol.scala akka-persistence/src/main/scala/akka/persistence/Persistent.scala akka-persistence/src/main/scala/akka/persistence/PersistentChannel.scala akka-persistence/src/main/scala/akka/persistence/Processor.scala akka-persistence/src/main/scala/akka/persistence/Snapshot.scala akka-persistence/src/main/scala/akka/persistence/journal/AsyncWriteProxy.scala akka-persistence/src/main/scala/akka/persistence/journal/inmem/InmemJournal.scala akka-persistence/src/main/scala/akka/persistence/journal/leveldb/LeveldbKey.scala akka-persistence/src/main/scala/akka/persistence/snapshot/SnapshotStore.scala akka-persistence/src/test/scala/akka/persistence/serialization/SerializerSpec.scala project/AkkaBuild.scala
This commit is contained in:
parent
c8406e3466
commit
4bb321a83a
58 changed files with 502 additions and 435 deletions
|
|
@ -22,13 +22,13 @@ trait SnapshotStore extends Actor {
|
|||
private val publish = extension.settings.internal.publishPluginCommands
|
||||
|
||||
final def receive = {
|
||||
case LoadSnapshot(processorId, criteria, toSequenceNr) ⇒
|
||||
case LoadSnapshot(persistenceId, criteria, toSequenceNr) ⇒
|
||||
val p = sender()
|
||||
loadAsync(processorId, criteria.limit(toSequenceNr)) map {
|
||||
loadAsync(persistenceId, criteria.limit(toSequenceNr)) map {
|
||||
sso ⇒ LoadSnapshotResult(sso, toSequenceNr)
|
||||
} recover {
|
||||
case e ⇒ LoadSnapshotResult(None, toSequenceNr)
|
||||
} pipeTo (p)
|
||||
} pipeTo p
|
||||
case SaveSnapshot(metadata, snapshot) ⇒
|
||||
val p = sender()
|
||||
val md = metadata.copy(timestamp = System.currentTimeMillis)
|
||||
|
|
@ -58,7 +58,7 @@ trait SnapshotStore extends Actor {
|
|||
* @param processorId processor id.
|
||||
* @param criteria selection criteria for loading.
|
||||
*/
|
||||
def loadAsync(processorId: String, criteria: SnapshotSelectionCriteria): Future[Option[SelectedSnapshot]]
|
||||
def loadAsync(persistenceId: String, criteria: SnapshotSelectionCriteria): Future[Option[SelectedSnapshot]]
|
||||
|
||||
/**
|
||||
* Plugin API: asynchronously saves a snapshot.
|
||||
|
|
@ -86,9 +86,9 @@ trait SnapshotStore extends Actor {
|
|||
/**
|
||||
* Plugin API: deletes all snapshots matching `criteria`.
|
||||
*
|
||||
* @param processorId processor id.
|
||||
* @param persistenceId processor id.
|
||||
* @param criteria selection criteria for deleting.
|
||||
*/
|
||||
def delete(processorId: String, criteria: SnapshotSelectionCriteria)
|
||||
def delete(persistenceId: String, criteria: SnapshotSelectionCriteria)
|
||||
//#snapshot-store-plugin-api
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue