Merge PatternsCS to Patterns (#26008)

* !act Move some Java API methods from PatternsCS to Patterns.

* Deprecate PatternCS and in favor of Patterns.
This commit is contained in:
kerr 2018-12-06 22:40:43 +08:00 committed by Patrik Nordwall
parent 4f100a1f1e
commit b7f3cbef94
16 changed files with 295 additions and 118 deletions

View file

@ -20,7 +20,6 @@ import jdocs.stream.TwitterStreamQuickstartDocTest.Model.Tweet;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import scala.concurrent.duration.FiniteDuration;
import java.time.Duration;
import java.util.Arrays;
@ -33,7 +32,7 @@ import java.util.concurrent.CompletionStage;
import java.util.concurrent.Executor;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import static akka.pattern.PatternsCS.ask;
import static akka.pattern.Patterns.ask;
import static jdocs.stream.TwitterStreamQuickstartDocTest.Model.AKKA;
import static jdocs.stream.TwitterStreamQuickstartDocTest.Model.tweets;
import static junit.framework.TestCase.assertTrue;
@ -602,7 +601,7 @@ public class IntegrationDocTest extends AbstractJavaTest {
final RunnableGraph<NotUsed> saveTweets =
akkaTweets
.mapAsync(4, tweet -> ask(database, new Save(tweet), 300))
.mapAsync(4, tweet -> ask(database, new Save(tweet), Duration.ofMillis(300L)))
.to(Sink.ignore());
//#save-tweets