Commit graph

95 commits

Author SHA1 Message Date
Patrik Nordwall
646e68416d
Merge pull request #26568 from akka/updateScalaTest
Update scalatest to 3.0.7
2019-03-26 15:09:23 +01:00
Arnout Engelen
d390fcf183 Introduce warning silencer plugin (#26588)
So now we can compile akka-distributed-data with
-Xfatal-warnings - though I'm not yet sure about
enabling the (other) undisciplineScalacOptions

* Fix multi-node silencing
* Fix scaladoc warnings
* Introduce annotation to declare ccompat use
* Add explicit toString
* Fix deprecation on 2.13
* Move 'immutable' ccompat helpers to shared ccompat package
* Add MiMa for internal scala 2.13 compatibility class
* Internal API markers
* Fix scaladoc generation
Got bitten by https://github.com/scala/bug/issues/11021
2019-03-26 14:41:29 +01:00
Arnout Engelen
b214115051
Update scalatest 2019-03-19 11:25:48 +01:00
Auto Format
75579bed17 format source with scalafmt, #26511 2019-03-15 10:23:46 +01:00
Patrik Nordwall
48a43e1e74 Issue references to FIXMEs in Typed (#26513)
* Issue references to FIXMEs in Typed

* comment out ctx.ask example with 2 param

* doesn't compile with 2.13, separarate issue created
2019-03-14 10:07:08 +01:00
Johan Andrén
7fc591c182
Signals instead of callbacks for eventsourced behavior #25428 2019-03-12 13:18:00 +01:00
Auto Format
ce404e4f53 format source with scalafmt 2019-03-11 16:58:55 +01:00
Patrik Nordwall
5c96a5f556 replace unicode arrows
* ⇒, →, ←
* because we don't want to show them in documentation snippets and
  then it's complicated to avoid that when snippets are
  located in src/test/scala in individual modules
* dont replace object `→` in FSM.scala and PersistentFSM.scala
2019-03-11 16:58:51 +01:00
Patrik Nordwall
abfb4497e7 harden ClusterShardingPersistenceSpec by using onPostStop, #26230 2019-02-20 11:23:42 +01:00
Seth Tisue
fc23f03031 upgrade to latest ScalaTest (#26387)
stuff moved to a new package. you wouldn't expect that in a point
release, but they put type aliases in place so Scala users wouldn't
notice. but the change is visible to Java code.

the upgrade is not strictly necessary, but it would be convenient
for the Scala 2.13 community build to have this merged, so I don't
have to maintain these changes in our Akka fork
2019-02-17 19:45:39 +00:00
Johan Andrén
53a6614444 Align the names of the typed persistence builders (#26314)
* Align the names of the typed persistence builders with the ones in the behavior builders #26313
2019-02-04 09:27:53 +00:00
Patrik Nordwall
794a8cc6ff Stashing in persistent behavior, #25717
* Effect.stash, Effect.thenUnstashAll
* unstash one at a time, and start with external stash if UnstashAll is in progress
* handle restarts
* handle PoisonPill
* fix PerformanceSpec, because now the internal stash is cleared if exception is thrown
* work with PoisonPill
2019-01-18 17:47:51 +01:00
Renato Cavalcanti
db4f224f4a Improve builders in Java Persistentce Typed, #26109
* CommandHandlersBuilder DSL refactoring

* some minor improvements

* removes obsolete examples

* event handlers by state (follows cmd handlers design)

* fix state predicates

* removes obsolete matchEvent methods

* minor improvements and formatting

* make it compile for 2.11.x

* fixes sharding tests

* promote forAnyState when applicable, improved javadoc and formatting

* reformatted with new java formatter

* matchAny in cmd handler builder builds the command handler

* make stateClass and statePredicate private fields

* build() does not reset the builder

* improved scaladoc
2019-01-18 13:52:16 +01:00
Patrik Nordwall
f4defb139b
use receiveOne instead of receiveMessageType, #25914
* use receiveOne instead of receiveMessageType, #25914

* when the type is the same as the probe's type

* formatting

* rename receiveOne to receiveMessage

* rename receiveN to receiveMessages

* have to use different name in javadsl so that became receiveSeveralMessages
2019-01-15 09:23:30 +01:00
Helena Edelson
00b235d9c5
Support rolling update for new JoinConfigCompatChecker #26194 (#26229)
Support rolling update for new JoinConfigCompatChecker #26194
2019-01-14 09:15:22 -08:00
hepin1989
998c5a9285 Formatting java codes with sbt-java-formatter. 2019-01-12 04:00:53 +08:00
Arnout Engelen
d274e039f9
Various scala-2.13.0-M5 fixes
fix akka-actor-tests compile errors

some tests still fail though

Fix test failures in akka-actor-test

Manually work arround missing implicit Factory[Nothing, Seq[Nothing]]

see https://github.com/scala/scala-collection-compat/issues/137

akka-remote scalafix changes

Fix shutdownAll compile error

test:akka-remote scalafix changes

akka-multi-node-testkit scalafix

Fix akka-remote-tests multi-jvm compile errors

akka-stream-tests/test:scalafix

Fix test:akka-stream-tests

Crude implementation of ByteString.map

scalafix akka-actor-typed, akka-actor-typed-tests

akka-actor-typed-tests compile and succeed

scalafix akka-camel

scalafix akka-cluster

akka-cluster compile & test

scalafix akka-cluster-metrics

Fix akka-cluster-metrics

scalafix akka-cluster-tools

akka-cluster-tools compile and test

scalafix akka-distributed-data

akka-distributed-data fixes

scalafix akka-persistence

scalafix akka-cluster-sharding

fix akka-cluster-sharding

scalafix akka-contrib

Fix akka-cluster-sharding-typed test

scalafix akka-docs

Use scala-stm 0.9 (released for M5)

akka-docs

Remove dependency on collections-compat

Cherry-pick the relevant constructs to our own
private utils

Shorten 'scala.collections.immutable' by importing it

Duplicate 'immutable' imports

Use 'foreach' on futures

Replace MapLike with regular Map

Internal API markers

Simplify ccompat by moving PackageShared into object

Since we don't currently need to differentiate between 2.11 and

Avoid relying on 'union' (and ++) being left-biased

Fix akka-actor/doc by removing -Ywarn-unused

Make more things more private

Copyright headers

Use 'unsorted' to go from SortedSet to Set

Duplicate import

Use onComplete rather than failed.foreach

Clarify why we partly duplicate scala-collection-compat
2019-01-11 12:27:18 +01:00
Helena Edelson
c217ef55a4 Remove duplicate code in Cluster Sharding Typed HashCode*MessageExtractor [#26197] (#26204)
* Remove duplicate code in Cluster Sharding Typed HashCode*MessageExtractor #26197

* Relocated comments per review suggestion.

* Reverting the overlooked math.abs
2019-01-08 14:12:12 +00:00
Helena Edelson
dbd1b78623
Add JoinConfigCompatChecker for in Typed #25667 (#26174)
[#25667[(https://github.com/akka/akka/issues/25667)
2019-01-04 07:04:12 -08:00
kerr
bdc90052aa Update headers from 2018 to 2019 once for all. (#26165)
* Add CopyrightHeader support for sbt-boilerplate plugin.
* Add CopyrightHeader support for `*.proto` files.
* Add regex match for both `–` and `-` for CopyrightHeader.
* Add CopyrightHeader support for sbt build files.
* Update copyright from 2018 to 2019.
2019-01-02 11:55:26 +01:00
Helena Edelson
d74426a255 Rename akka.actor.typed.ActorContext #25734 (#26146) 2018-12-21 11:17:26 +01:00
hepin1989
c38a5dcf9c Run scalafix to remove unused imports again. 2018-12-17 21:10:11 +08:00
Christopher Batey
da71e2044e
Allign typed singleton with typed sharding (#26013)
* Allign typed singleton with typed sharding

* Singleton class for setting proerties
* Make stop message optional

Closes #25670
2018-12-06 16:26:38 +00:00
Helena Edelson
dbfe6f38c7 Rename PersistentBehavior (#25721)
Migrated InternalProtocol with least refactor changes, in the end.
2018-12-05 12:05:59 +01:00
Arnout Engelen
7afd847758 fix akka-cluster-sharding-typed/test:compile (#26046)
Weird that CI didn't catch this
2018-12-05 10:30:38 +00:00
Christopher Batey
f1b9adb0c4
Behavior.orElse start the other behavior (#25977)
* Behavior.orElse start the other behavior
* Finalize the case classes
2018-12-05 10:10:48 +00:00
kerr
e9fb3a020a Make use of scalafix to remove unused import. (#26019)
* =build Add scalafix to remote unused import.

* +build Add file ignore plugin for scalafix which support ignore files.
2018-12-05 08:30:21 +00:00
Christopher Batey
b38b407c73
Typed sharding: Allow queying of local shard region (#25409)
* Typed sharding: Allow quering of local shard region

Partially addresses #24466 still need to query
all shard regions

* Update to new testkit
2018-12-04 15:53:07 +00:00
Patrik Nordwall
134826afff
Merge pull request #26040 from akka/widenTimeoutClusterShardingPersistenceSpec
Widen timeout to fix ClusterShardingPersistenceSpec
2018-12-04 13:38:27 +01:00
Arnout Engelen
e761a072fe Widen timeout to fix ClusterShardingPersistenceSpec #25936 2018-12-04 12:29:27 +01:00
kerr
f7a95b5228 !typ Rename ActorContext#upcast to ActorContext#unsafeUpcast. (#25973) 2018-11-30 07:52:04 +00:00
Johan Andrén
f66ee1cbe8
Handle lost typed receptionist removals #24887
Keep track of removed actors and re-remove them when ORMultiMap conflict has reintroduced them
2018-11-09 10:58:18 +01:00
Patrik Nordwall
42adfd781c
Merge pull request #25801 from akka/wip-25794-ClusterShardingSpec-patriknw
Hardening of typed./ClusterShardingSpec, #25794
2018-11-09 09:53:14 +01:00
Patrik Nordwall
4d115f19a6 rename ClusterSharding start to init, #25711 (#25867)
* rename ClusterSharding start to init, #25711

* fix test
2018-11-06 19:43:55 +01:00
Patrik Nordwall
9c1153b1a6 Make the stop message in sharding optional, #25642
* It's mostly technical concern that is blurring the business logic in the entity
* Async interactions before stopping is often not needed
* Implemented with an internal PoisonPill signal that is added by sharding,
* Persistent actors handle PoisonPill and run side effects after persist
  and process stashed messages before stopping.

* remove unecessary stop messages

* reference docs
2018-11-06 19:43:55 +01:00
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
Arnout Engelen
7bbac405c3 Widen timeout waiting for sharding to initialize (#25752) (#25856) 2018-11-05 14:15:49 +01:00
kerr
fafc59b19d update headers to regular comment (#25807) 2018-10-29 05:19:37 -04: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
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
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
baf14589d2 Hardening of typed./ClusterShardingSpec, #25794
* The replies didn't change after the leaving
* I see two reason why it could have failed
  * The test is sending the same messages as the very first thing
    earlier in the test and then sharding might not now about the
    two nodes and therefore allocated all to one node
  * All messages are hashed to the same node/shard
2018-10-17 12:09:52 +02:00
Patrik Nordwall
d9af08757e rename PersistentBehaviors.receive to PersistentBehavior.apply 2018-10-09 13:47:22 +02:00
Patrik Nordwall
f2ad055c77 Improve AskTimeoutException message, #25644 2018-09-26 08:00:11 +02:00
Patrik Nordwall
824e4196e7 Introduce RecipientRef interface for ActorRef and EntityRef, #24463
* to make it possible to use ActorContext.ask also with EntityRef
  destinations
* this abstraction will probably be useful for other things, where a
  full ActorRef is not required
* a RecipientRef only has to support tell (and ask), while a full ActorRef
  is watchable (destination has a lifecycle) and location transparent (serializable)
2018-09-21 14:39:18 +02:00
Patrik Nordwall
6d8d646fe5
Merge pull request #25539 from akka/wip-25480-sharding-start-patriknw
Simplify signature of ClusterSharding.spawn, #25480
2018-09-21 14:21:33 +02:00
Johan Andrén
a8cfe1e0ff
Merge pull request #25654 from johanandren/wip-25620-remove-typed-persistence-ctx-param-johanandren
Remove the ActorContext parameter from the scaladsl command handler
2018-09-21 13:51:09 +02:00