-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
revert rename of
SnapshotterInterop
as it collides with one in akka…
…-effect (revert 467188f)
- Loading branch information
Showing
3 changed files
with
20 additions
and
34 deletions.
There are no files selected for viewing
28 changes: 19 additions & 9 deletions
28
safe-persistence/src/main/scala/akka/persistence/SnapshotterFromPersistenceSnapshotter.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,24 @@ | ||
package akka.persistence | ||
|
||
import akka.persistence.SnapshotProtocol.SaveSnapshot | ||
import com.evolutiongaming.safeakka | ||
import com.evolutiongaming.safeakka.persistence.SeqNr | ||
|
||
/* | ||
The class has been renamed to SnapshotterInterop by Yaroslav Klymko after 3.0.0 release, but the changes never got | ||
to release. | ||
The class has been restored with deprecation to satisfy MiMa bincompat report. | ||
*/ | ||
|
||
@deprecated(message = "use SnapshotterInterop", since = "3.1.0") | ||
object SnapshotterFromPersistenceSnapshotter { | ||
def apply[A](snapshotter: Snapshotter): safeakka.persistence.Snapshotter[A] = SnapshotterInterop.apply(snapshotter) | ||
} | ||
|
||
def apply[A]( | ||
snapshotter: Snapshotter | ||
): safeakka.persistence.Snapshotter[A] = new safeakka.persistence.Snapshotter[A] { | ||
|
||
def save(snapshot: A) = snapshotter.saveSnapshot(snapshot) | ||
|
||
def save(seqNr: SeqNr, snapshot: A) = { | ||
val saveSnapshot = SaveSnapshot(SnapshotMetadata(snapshotter.snapshotterId, seqNr), snapshot) | ||
snapshotter.snapshotStore.tell(saveSnapshot, snapshotter.self) | ||
} | ||
|
||
def delete(seqNr: SeqNr) = snapshotter.deleteSnapshot(seqNr) | ||
|
||
def delete(criteria: SnapshotSelectionCriteria) = snapshotter.deleteSnapshots(criteria) | ||
} | ||
} |
24 changes: 0 additions & 24 deletions
24
safe-persistence/src/main/scala/akka/persistence/SnapshotterInterop.scala
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters