+per #16339 adds actorSelection support to AtLeastOnceDelivery
TODO: need to add docs updates
This commit is contained in:
parent
235df6ce09
commit
b335b6ae9b
10 changed files with 183 additions and 75 deletions
|
|
@ -3,11 +3,7 @@
|
|||
*/
|
||||
package docs.persistence;
|
||||
|
||||
import akka.actor.AbstractActor;
|
||||
import akka.actor.ActorPath;
|
||||
import akka.actor.ActorRef;
|
||||
import akka.actor.ActorSystem;
|
||||
import akka.actor.Props;
|
||||
import akka.actor.*;
|
||||
import akka.japi.Procedure;
|
||||
import akka.japi.pf.ReceiveBuilder;
|
||||
import akka.pattern.BackoffSupervisor;
|
||||
|
|
@ -170,9 +166,9 @@ public class LambdaPersistenceDocTest {
|
|||
}
|
||||
|
||||
class MyPersistentActor extends AbstractPersistentActorWithAtLeastOnceDelivery {
|
||||
private final ActorPath destination;
|
||||
private final ActorSelection destination;
|
||||
|
||||
public MyPersistentActor(ActorPath destination) {
|
||||
public MyPersistentActor(ActorSelection destination) {
|
||||
this.destination = destination;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,13 +6,9 @@ package docs.persistence;
|
|||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import akka.actor.*;
|
||||
import akka.pattern.BackoffSupervisor;
|
||||
import scala.concurrent.duration.Duration;
|
||||
import akka.actor.ActorPath;
|
||||
import akka.actor.ActorRef;
|
||||
import akka.actor.ActorSystem;
|
||||
import akka.actor.Props;
|
||||
import akka.actor.UntypedActor;
|
||||
import akka.japi.Function;
|
||||
import akka.japi.Procedure;
|
||||
import akka.persistence.*;
|
||||
|
|
@ -147,12 +143,12 @@ public class PersistenceDocTest {
|
|||
}
|
||||
|
||||
class MyPersistentActor extends UntypedPersistentActorWithAtLeastOnceDelivery {
|
||||
private final ActorPath destination;
|
||||
private final ActorSelection destination;
|
||||
|
||||
@Override
|
||||
public String persistenceId() { return "persistence-id"; }
|
||||
|
||||
public MyPersistentActor(ActorPath destination) {
|
||||
public MyPersistentActor(ActorSelection destination) {
|
||||
this.destination = destination;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue