Commit graph

22708 commits

Author SHA1 Message Date
Johan Andrén
133c41375f Automatic passivation for typed sharding, #25512 2018-11-06 19:15:23 +01:00
Patrik Nordwall
3ccc67b3d6
Merge pull request #25812 from akka/wip-25706-thenRun-patriknw
align Effect API between scaladsl and javadsl, #25706
2018-11-06 16:09:39 +01:00
Patrik Nordwall
a948f5572b align Effect API between scaladsl and javadsl, #25706
scaladsl:
* stop => stop()
* andThenStop() => thenStop()

javadsl:
* andThen => thenRun
2018-11-06 15:02:08 +01:00
Dale Wijnand
934a28ba5c Rename ActorContext#schedule with scheduleOnce (#25869) 2018-11-06 11:05:43 +01:00
Patrik Nordwall
ee9b0e6d24
Merge pull request #25868 from dwijnand/unleash-OptionVal
Allow OptionVal to hold boxed primitives
2018-11-05 19:56:53 +01:00
Dale Wijnand
ee04105a5e
Allow OptionVal to hold boxed primitives
Previously OptionVal was restricted to types that have Null as their
bottom type, that is reference types (that extend AnyRef/Object), rather
than also allowing primitives (that extend AnyVal).

By removing this restrictions any type is a valid type argument.

The effect this will have is that primitives will be box, because we
need a way to represent the None case (using the null value).
2018-11-05 15:28:42 +00:00
Tim Moore
8247c8df50 Fix typo in lookup of ResolverConfiguration (#25826)
* Fix typo in lookup of ResolverConfiguration

* Set a longer timeout for launching bind
2018-11-05 15:05:16 +01:00
Dale Wijnand
9941f7d800 Consistently bind ActorContext to 'context' in the docs (#25852)
* Consistently bind ActorContext to 'ctx' in the docs

... over the lesser uses 'context':

    $ rg 'Behavior[s]?.setup' akka-docs/src/test/scala/docs/actor/TypedActorDocSpec.scala akka-actor-typed-tests/ akka-actor-testkit-typed/ | rg ctx | wc -l
          59
    $ rg 'Behavior[s]?.setup' akka-docs/src/test/scala/docs/actor/TypedActorDocSpec.scala akka-actor-typed-tests/ akka-actor-testkit-typed/ | rg context | wc -l
           8
    $ rg 'Behavior[s]?.receive' akka-docs/src/test/scala/docs/actor/TypedActorDocSpec.scala akka-actor-typed-tests/ akka-actor-testkit-typed/ | rg ctx | wc -l
          66
    $ rg 'Behavior[s]?.receive' akka-docs/src/test/scala/docs/actor/TypedActorDocSpec.scala akka-actor-typed-tests/ akka-actor-testkit-typed/ | rg context | wc -l
           5

* Fix "variable ctx is already defined" warnings

* Replace ctx with context, in docs & doc snippets

    fastmod '\bctx\b' 'context' \
        akka-docs/src/main/paradox/typed
        akka-docs/src/test/scala/docs/actor/TypedActorDocSpec.scala \
        akka-actor-typed-tests/ \
        akka-actor-testkit-typed/ \

* Replace msg with message, in docs & doc snippets

    fastmod '\bmsg\b' 'message' \
        akka-docs/src/test/scala/docs/actor/TypedActorDocSpec.scala \
        akka-actor-typed-tests/ \
        akka-actor-testkit-typed/
        akka-docs/src/main/paradox/typed/

* Fix code alignment
2018-11-05 13:53:18 +00:00
Arnout Engelen
7bbac405c3 Widen timeout waiting for sharding to initialize (#25752) (#25856) 2018-11-05 14:15:49 +01:00
Dale Wijnand
91101d996c Mini cleanup to stream.ActorMaterializer (#25866)
Do it once, instead of in all 4 call sites.
2018-11-05 14:10:54 +01:00
Arnout Engelen
079aa46733 Introduce 'MemberDowned' member event (#25854)
* Introduce 'MemberDowned' member event

Compatiblity note: MemberEvent is a sealed trait, so it is debatable whether
it is acceptable to introduce a new member.

* Be more conservative (more like leaving), add test
2018-11-05 10:03:06 +00:00
Dale Wijnand
cb9b35d8ee Favour Behaviors.receiveMessage in the docs (#25853)
... over Behaviors.receive, but not using the ActorContext binding.
2018-11-05 09:57:36 +00:00
Dale Wijnand
6a04731971 Dilation cleanups (#25861)
* Avoid calling asInstanceOf in dilated

* Fix the rounding in dilated for Java

* Delegate Java dilated to Scala dilated

* Import scala.concurrent.duration.Duration
2018-11-05 09:55:40 +00:00
Christopher Batey
f51c8d8506 Read port/weight/priority as unsigned shorts for SRVRecords (#25842)
* Read port/weight/priority as unsigned shorts for SRVRecords

* Delete writing code for resource records. Isn't used/tested.

* Mima and review feedback
2018-11-05 09:41:47 +01:00
Ignasi Marimon-Clos
48cf769ee7 Fix: DNS TTL uses seconds while caching usese millis (#25848)
* Fix: DNS TTL uses seconds while caching uses millis
* Consistently rename ttl vals in companion objects. Add mima filters.
* Rename fields to ttlInZzzz format
2018-11-02 15:44:33 +01:00
Dale Wijnand
87a033efff @DoNotInherit typed.ActorRef (#25851) 2018-11-02 11:46:20 +00:00
Johan Andrén
6329a7b77e
Ignore vendor when selecting JVMs #25835 2018-10-30 10:51:30 +01:00
kerr
fafc59b19d update headers to regular comment (#25807) 2018-10-29 05:19:37 -04:00
mohammad mehdi
ba996f8c5f example for some sink operators #25468
Examples for takeLast, last and lastOption operators
2018-10-25 09:40:36 -04:00
Saleh Khazaei
91b0c387be Add examples for Fan-in operators #25468 2018-10-25 09:37:48 -04:00
Jonas Chapuis
b8a9f8b6d7 Zip/Unzip support up to 22 ports (#25742)
* Zip/Unzip support up to 22 inputs/outputs respectively
2018-10-24 09:38:07 -04:00
Patrik Nordwall
4479046d1e fix cluster routing docs (#25810)
* broke when it was moved to separate page
2018-10-24 08:13:43 -04:00
Johannes Rudolph
655bef2e71 Fix typo in reference.conf (#25821) 2018-10-24 07:42:03 -04:00
Patrik Nordwall
751a67ef42
Merge pull request #25659 from akka/shardingErrorMessage
Add troubleshooting hint to logging
2018-10-18 15:07:12 +02:00
Dolly Gyanchandani
e26a90f340 Create typed ActorMaterializer from ActorContext, ##25536
* Create typed ActorMaterializer from ActorContext to bind stream's lifecycle with an actor's lifecycle

* Add Java API for creating typed ActorMaterializer from ActorContext
2018-10-18 15:03:27 +02:00
Patrik Nordwall
abb3429bc8
Merge pull request #25804 from akka/wip-25750-AbstractBehavior-patriknw
Rename MutableBehavior to AbstractBehavior, #25750
2018-10-18 13:16:48 +02:00
Patrik Nordwall
1d4fb852d0
Merge pull request #25697 from akka/wip-PersistentEntity-patriknw
PersistentEntity to glue together Sharding and PersistentBehavior better
2018-10-18 13:11:18 +02:00
Patrik Nordwall
2672bd7a95 PersistentEntity to glue together Sharding and PersistentBehavior better
* Makes the combination more visable
* You don't have to worry about the persistenceId, only EntityTypeKey and entityId
* The glue is stronger in the javadsl because of two reasons
  * Couldn't realisticly create a PersistentEntity class extending PersistenBehavior (which
    contains all the optional parameters and functions) since that would duplicate too much.
  * The ActorContext would be needed in the ShardedEntityContext parameter and because of the
    additional M type parameters the type inference breaks down when using the factory. Would
    require specifying the type of the ShardedEntityContex[M] parameter. That problem doesn't
    seem to exist in Java.

renamed:
s/ShardedEntityContext/EntityContext/
s/ShardedEntity/Entity/
2018-10-18 11:47:51 +02:00
Patrik Nordwall
bed17cc172
null as empty state, in javadsl, #25768 2018-10-18 11:38:27 +02:00
Patrik Nordwall
1691961a10
AccountExample in Scala in a few flavors, #25485
* AccountExample in Scala in a few flavors
* include Account examples in reference docs
* cleanup BlogPost example
* include reply doc snippets
2018-10-18 11:37:06 +02:00
Patrik Nordwall
58ec80d4f8
Merge pull request #25692 from akka/wip-25482-then-reply-patriknw
thenReply Effect, #25482
2018-10-17 16:49:23 +02:00
Patrik Nordwall
49f66221f5 remove verbose from classgraph (#25806)
* this also fixes the performance regression of akka-docs/paradox
2018-10-17 16:24:39 +02:00
Patrik Nordwall
81c7adf4a1 thenReply Effect, #25482
* enforce ReplyEffect
2018-10-17 14:02:16 +02:00
Patrik Nordwall
4131036a12
PersistenceId type to differentiate between persistenceId and entityId, #25703 (#25704)
* PersistenceId type to differentiate between persistenceId and entityId, #25703

* both entityId (for sharding) and persistenceId as String types was easy
  mix-up
* utility method in EntityTypeKey to concatenaty the type and entityId to
  a unique persistenceId

* support custom separator to enable compatilbility with Lagom's javadsl
2018-10-17 13:53:50 +02:00
Patrik Nordwall
570896f22a
Merge pull request #25783 from ignasi35/bumps-ssl-config-036
Bumps ssl-config 0.3.6
2018-10-17 13:40:14 +02:00
Patrik Nordwall
77b5c15c5c
Merge pull request #25805 from akka/wip-sbt-1.2.6-patriknw
update to sbt 1.2.6
2018-10-17 13:39:38 +02:00
Patrik Nordwall
f907941c8a update to sbt 1.2.6
* due to https://github.com/sbt/zinc/pull/606
2018-10-17 12:01:02 +02:00
Patrik Nordwall
bf4a6c37b4
Merge pull request #25577 from akka/getAnonymousChildInboxByActorRef
BehaviorTestKit: get child inbox by anonymous ActorRef
2018-10-17 11:41:22 +02:00
Patrik Nordwall
ad3ad15747 Rename MutableBehavior to AbstractBehavior, #25750
* Also cleanup javadsl Receive, which is only used from AbstractBehavior
* Clarify further in docs that the functional vs OO style is a matter of taste
2018-10-17 08:53:37 +02:00
kerr
1b6d185f83 =plugin migrate FastClasspathScanner to ClassGraph (#25797) 2018-10-16 18:02:46 +01:00
Arnout Engelen
23b7f86a06
Async DNS over TCP (#25690) 2018-10-16 15:35:55 +02:00
Patrik Nordwall
d71ba251ed make java sample code independent of Scala (#25800)
* need this for gathering and compiling java sources (in IDE),
  https://github.com/patriknw/akka-compile-ide-java
2018-10-16 13:52:54 +01:00
J Evans
e7347ffee4 grammar nit (#25791) 2018-10-15 23:13:07 +02:00
Patrik Nordwall
b89a7e5df5 Use Props factory methods in getting started tutorial (#25713)
* Use Props factory methods in getting started tutorial

* deprecate Props.create without actorClass parameter, #25718
2018-10-15 17:12:41 +01:00
Arnout Engelen
4b012cc306 Document 'withBackoff' srouce/flow/sink (#25770) 2018-10-15 17:11:33 +01:00
Stephen Kitt
f4dd0ac79d Avoid incorrect OSGi dep on sslconfig.akka (#25580)
Importing com.typesafe.sslconfig.* with the sslconfig version results
in OSGi bundle imports which also include com.typesafe.sslconfig.akka,
which can’t be satisfied with the given version range. Splitting up
the imported packages (com.typesafe.sslconfig,
com.typesafe.sslconfig.ssl.*, com.typesafe.sslconfig.util.*) results
in tighter-scoped imports which can be satisfied.

This fixes #25579.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2018-10-15 15:41:00 +02:00
Mark Hammons
f32d6c5a68 Don't return Iterable(null) when Probe.fishForMessage times out (#25629)
* Fix for issue #25616

I haven't had a chance to test this, but it looks to me that this is the solution to issue #25616. 

My stacktrace in this issue is this: 
```
java.lang.NullPointerException
	at eu.phy_awaas.irods.typed.lockingsystem.IRODSLockManagerSpec.$anonfun$new$20(IRODSLockManagerSpec.scala:91)
	at akka.actor.testkit.typed.internal.TestProbeImpl.loop$1(TestProbeImpl.scala:189)
	at akka.actor.testkit.typed.internal.TestProbeImpl.loop$1(TestProbeImpl.scala:201)
	at akka.actor.testkit.typed.internal.TestProbeImpl.fishForMessage_internal(TestProbeImpl.scala:215)
	at akka.actor.testkit.typed.internal.TestProbeImpl.fishForMessage_internal(TestProbeImpl.scala:45)
	at akka.actor.testkit.typed.scaladsl.TestProbe.fishForMessage(TestProbe.scala:175)
	at akka.actor.testkit.typed.scaladsl.TestProbe.fishForMessage$(TestProbe.scala:174)
	at akka.actor.testkit.typed.internal.TestProbeImpl.fishForMessage(TestProbeImpl.scala:45)
	at akka.actor.testkit.typed.scaladsl.TestProbe.fishForMessage(TestProbe.scala:181)
	at akka.actor.testkit.typed.scaladsl.TestProbe.fishForMessage$(TestProbe.scala:180)
	at akka.actor.testkit.typed.internal.TestProbeImpl.fishForMessage(TestProbeImpl.scala:45)
	at eu.phy_awaas.irods.typed.lockingsystem.IRODSLockManagerSpec.$anonfun$new$18(IRODSLockManagerSpec.scala:88)
	at org.scalatest.OutcomeOf.outcomeOf(OutcomeOf.scala:85)
	at org.scalatest.OutcomeOf.outcomeOf$(OutcomeOf.scala:83)
	at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
	at org.scalatest.Transformer.apply(Transformer.scala:22)
	at org.scalatest.Transformer.apply(Transformer.scala:20)
	at org.scalatest.WordSpecLike$$anon$1.apply(WordSpecLike.scala:1078)
	at org.scalatest.TestSuite.withFixture(TestSuite.scala:196)
	at org.scalatest.TestSuite.withFixture$(TestSuite.scala:195)
	at org.scalatest.WordSpec.withFixture(WordSpec.scala:1881)
	at org.scalatest.WordSpecLike.invokeWithFixture$1(WordSpecLike.scala:1076)
	at org.scalatest.WordSpecLike.$anonfun$runTest$1(WordSpecLike.scala:1088)
	at org.scalatest.SuperEngine.runTestImpl(Engine.scala:289)
	at org.scalatest.WordSpecLike.runTest(WordSpecLike.scala:1088)
	at org.scalatest.WordSpecLike.runTest$(WordSpecLike.scala:1070)
	at org.scalatest.WordSpec.runTest(WordSpec.scala:1881)
	at org.scalatest.WordSpecLike.$anonfun$runTests$1(WordSpecLike.scala:1147)
	at org.scalatest.SuperEngine.$anonfun$runTestsInBranch$1(Engine.scala:396)
	at scala.collection.immutable.List.foreach(List.scala:389)
	at org.scalatest.SuperEngine.traverseSubNodes$1(Engine.scala:384)
	at org.scalatest.SuperEngine.runTestsInBranch(Engine.scala:373)
	at org.scalatest.SuperEngine.$anonfun$runTestsInBranch$1(Engine.scala:410)
	at scala.collection.immutable.List.foreach(List.scala:389)
	at org.scalatest.SuperEngine.traverseSubNodes$1(Engine.scala:384)
	at org.scalatest.SuperEngine.runTestsInBranch(Engine.scala:373)
	at org.scalatest.SuperEngine.$anonfun$runTestsInBranch$1(Engine.scala:410)
	at scala.collection.immutable.List.foreach(List.scala:389)
	at org.scalatest.SuperEngine.traverseSubNodes$1(Engine.scala:384)
	at org.scalatest.SuperEngine.runTestsInBranch(Engine.scala:379)
	at org.scalatest.SuperEngine.runTestsImpl(Engine.scala:461)
	at org.scalatest.WordSpecLike.runTests(WordSpecLike.scala:1147)
	at org.scalatest.WordSpecLike.runTests$(WordSpecLike.scala:1146)
	at org.scalatest.WordSpec.runTests(WordSpec.scala:1881)
	at org.scalatest.Suite.run(Suite.scala:1147)
	at org.scalatest.Suite.run$(Suite.scala:1129)
	at org.scalatest.WordSpec.org$scalatest$WordSpecLike$$super$run(WordSpec.scala:1881)
	at org.scalatest.WordSpecLike.$anonfun$run$1(WordSpecLike.scala:1192)
	at org.scalatest.SuperEngine.runImpl(Engine.scala:521)
	at org.scalatest.WordSpecLike.run(WordSpecLike.scala:1192)
	at org.scalatest.WordSpecLike.run$(WordSpecLike.scala:1190)
	at eu.phy_awaas.irods.typed.lockingsystem.IRODSLockManagerSpec.org$scalatest$BeforeAndAfterAll$$super$run(IRODSLockManagerSpec.scala:22)
	at org.scalatest.BeforeAndAfterAll.liftedTree1$1(BeforeAndAfterAll.scala:213)
	at org.scalatest.BeforeAndAfterAll.run(BeforeAndAfterAll.scala:210)
	at org.scalatest.BeforeAndAfterAll.run$(BeforeAndAfterAll.scala:208)
	at eu.phy_awaas.irods.typed.lockingsystem.IRODSLockManagerSpec.run(IRODSLockManagerSpec.scala:22)
	at org.scalatest.tools.SuiteRunner.run(SuiteRunner.scala:45)
	at org.scalatest.tools.Runner$.$anonfun$doRunRunRunDaDoRunRun$13(Runner.scala:1340)
	at org.scalatest.tools.Runner$.$anonfun$doRunRunRunDaDoRunRun$13$adapted(Runner.scala:1334)
	at scala.collection.immutable.List.foreach(List.scala:389)
	at org.scalatest.tools.Runner$.doRunRunRunDaDoRunRun(Runner.scala:1334)
	at org.scalatest.tools.Runner$.$anonfun$runOptionallyWithPassFailReporter$24(Runner.scala:1031)
	at org.scalatest.tools.Runner$.$anonfun$runOptionallyWithPassFailReporter$24$adapted(Runner.scala:1010)
	at org.scalatest.tools.Runner$.withClassLoaderAndDispatchReporter(Runner.scala:1500)
	at org.scalatest.tools.Runner$.runOptionallyWithPassFailReporter(Runner.scala:1010)
	at org.scalatest.tools.Runner$.run(Runner.scala:850)
	at org.scalatest.tools.Runner.run(Runner.scala)
	at org.jetbrains.plugins.scala.testingSupport.scalaTest.ScalaTestRunner.runScalaTest2(ScalaTestRunner.java:131)
	at org.jetbrains.plugins.scala.testingSupport.scalaTest.ScalaTestRunner.main(ScalaTestRunner.java:28)
```

With the calling code looking like this:

```scala
        val lockResults =
          probe.fishForMessage(Duration.create(10000, "ms"))(l => {
            r += 1
            if (r < 5) {
              l.lock.use(())//crash happens here
              FishingOutcomes.continue
            } else {
              l.lock.use(())
              FishingOutcomes.complete
            }
          })
```

It's pretty obvious receiveOne(timeout) returns a null when it receives nothing before the timeout, passes that along to my fisher function, which tries to perform work on the supposed message only to get a null instead.

* Added missing brace

* Manually formatted my code the way akka likes

I don't have the set up to compile this right now, so I just manually inserted the formatting that jenkins mentioned.

* More changes to fit the akka formatting standard

* Test for the new assertion error when fishing times out.

* Cleaned up a flaw I added from when I initially put this in async spec
2018-10-15 14:02:58 +02:00
Patrik Nordwall
af240d77aa
Merge pull request #25744 from akka/dontWarnAboutOldProtocolUse
Don't warn about old DNS protocol use
2018-10-15 13:37:10 +02:00
Patrik Nordwall
1b8da91b45
Merge pull request #25625 from btomala/feature/25348_missing_serializers_for_shard_region
Protobuf serializers for ShardRegionStats
2018-10-15 13:30:42 +02:00
Renato Cavalcanti
8e0b9b58e2 fixed typo in DNS extension documentation (#25789) 2018-10-12 18:16:00 +01:00