Removing pipeTo from akka.actor, renamed pipeTo(f,a) to pipe(f,a)
This commit is contained in:
parent
815245a133
commit
571af3d8d2
11 changed files with 24 additions and 38 deletions
|
|
@ -38,16 +38,16 @@ import akka.util.Duration;
|
|||
import akka.actor.ActorTimeoutException;
|
||||
//#import-gracefulStop
|
||||
|
||||
//#import-askPipeTo
|
||||
//#import-askPipe
|
||||
import static akka.pattern.Patterns.ask;
|
||||
import static akka.pattern.Patterns.pipeTo;
|
||||
import static akka.pattern.Patterns.pipe;
|
||||
import akka.dispatch.Future;
|
||||
import akka.dispatch.Futures;
|
||||
import akka.util.Duration;
|
||||
import akka.util.Timeout;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.ArrayList;
|
||||
//#import-askPipeTo
|
||||
//#import-askPipe
|
||||
|
||||
import akka.actor.Props;
|
||||
import akka.actor.UntypedActor;
|
||||
|
|
@ -224,12 +224,12 @@ public class UntypedActorDocTestBase {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void usePatternsAskPipeTo() {
|
||||
public void usePatternsAskPipe() {
|
||||
ActorSystem system = ActorSystem.create("MySystem");
|
||||
ActorRef actorA = system.actorOf(new Props(MyUntypedActor.class));
|
||||
ActorRef actorB = system.actorOf(new Props(MyUntypedActor.class));
|
||||
ActorRef actorC = system.actorOf(new Props(MyUntypedActor.class));
|
||||
//#ask-pipeTo
|
||||
//#ask-pipe
|
||||
final Timeout t = new Timeout(Duration.create(5, TimeUnit.SECONDS));
|
||||
|
||||
final ArrayList<Future<Object>> futures = new ArrayList<Future<Object>>();
|
||||
|
|
@ -247,8 +247,8 @@ public class UntypedActorDocTestBase {
|
|||
}
|
||||
});
|
||||
|
||||
pipeTo(transformed, actorC);
|
||||
//#ask-pipeTo
|
||||
pipe(transformed, actorC);
|
||||
//#ask-pipe
|
||||
system.shutdown();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ import static akka.japi.Util.manifest;
|
|||
|
||||
import static akka.actor.SupervisorStrategy.*;
|
||||
import static akka.pattern.Patterns.ask;
|
||||
import static akka.pattern.Patterns.pipeTo;
|
||||
import static akka.pattern.Patterns.pipe;
|
||||
|
||||
import static akka.docs.actor.japi.FaultHandlingDocSample.WorkerApi.*;
|
||||
import static akka.docs.actor.japi.FaultHandlingDocSample.CounterServiceApi.*;
|
||||
|
|
@ -145,7 +145,7 @@ public class FaultHandlingDocSample {
|
|||
counterService.tell(new Increment(1), getSelf());
|
||||
|
||||
// Send current progress to the initial sender
|
||||
pipeTo(ask(counterService, GetCurrentCount, askTimeout)
|
||||
pipe(ask(counterService, GetCurrentCount, askTimeout)
|
||||
.mapTo(manifest(CurrentCount.class))
|
||||
.map(new Mapper<CurrentCount, Progress>() {
|
||||
public Progress apply(CurrentCount c) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue