Commit graph

111 commits

Author SHA1 Message Date
Patrik Nordwall
beaa80b773
Merge pull request #26813 from akka/wip-26709-ask-ExpectingReply-patriknw
Type inference for EntityRef.ask, #26709
2019-06-14 11:18:26 +02:00
Christopher Batey
31def7049a Make Behaviors.intercept a factory () => BehaviorInterceptor, #26728 (#27102) 2019-06-14 11:16:12 +02:00
Patrik Nordwall
9e2ea2579b Type inference for EntityRef.ask, #26709
* move AccountExample to Sharding, to be able to test with EntityRef etc
* add tests for AccountExample
* for javadsl there is a problem
* explicity replyTo type solves javadsl issue
* use EventSourcedEntity.withEnforcedReplies
* try replyTo with super type AccountCommandReply
* Reply <: AccountCommandReply
* replace lambda with method (constructor) reference
2019-06-14 10:16:33 +02:00
Christopher Batey
a871176fd6 Use Duration in javadsl.EntityRef.ask (#27098)
Refs #26812
2019-06-14 09:17:19 +02:00
Patrik Nordwall
893bd8b74b
Remove ActorContext parameter from javadsl.ReceiveBuilder, #27120 (#27121)
* Remove ActorContext parameter from javadsl.ReceiveBuilder, #27120

* functional style in javadsl
* in Java it's more practical to have an enclosing class to hold
  initialization parameters and ActorContext
* writing behaviors as pure static methods will be unlikely be used in Java
* it's still possible to write behaviors as static methods by passing
  the context around, in same way as all other things
* better to embrace the enclosing class pattern and therefore remove
  the context parameter from the message handlers
* style cleanup of ChatRoom sample
* migration guide
2019-06-13 16:10:40 +02:00
Patrik Nordwall
5bb83899e7 Remove Behavior.same/empty/etc, #26730 (#27119)
* Removed `Behavior.same`, `Behavior.unhandled`, `Behavior.stopped`, `Behavior.empty`, and `Behavior.ignore` since
  they were redundant with corresponding in Behaviors
* Also moved several of the internal things from Behavior to BehaviorImpl
2019-06-12 09:38:37 +01:00
Arnout Engelen
4ac513a523
Unicode arrows (#26965) 2019-05-21 13:35:11 +02:00
Renato Cavalcanti
8eef461b7b Adds EventSourcedEntity with EnforcingReplies (#26692) 2019-05-17 09:09:18 +02:00
Patrik Nordwall
2bbf13f707
Run CoordinatedShutdown from ActorSystem.terminate #25213 (#26830) 2019-05-03 10:47:47 +02:00
Christopher Batey
efc3adc08d
Make artery the default remoting (#26772) 2019-05-01 08:12:09 +01:00
Patrik Nordwall
eb4caa7b8f harden ClusterShardingPersistenceTest (#26833)
* it was logging "No match found for command of type [akka.cluster.sharding.typed.javadsl.ClusterShardingPersistenceTest$StopPlz]"
* StopPlz not used in that test
2019-04-30 14:18:53 +02:00
Johan Östling
455e819f90 Fix typo in ShardingCompileOnlyTest.java (#26801) 2019-04-24 09:30:38 +02:00
Christopher Batey
3abc3583b6
Remove warnings in akka-cluster-sharding-typed (#26747)
* Remove warnings in akka-cluster-sharding-typed

* Revert entity create in java dsl and actor benchmark changes
2019-04-16 15:09:41 +01:00
Patrik Nordwall
a5e9741d35 replace unicode arrows again (#26732) 2019-04-15 15:40:26 +00:00
Patrik Nordwall
1120a31e87
include state in EventSourcedBehavior.receiveSignal, #26574 (#26643)
* include state in EventSourcedBehavior.receiveSignal, #26574

* because state type can't be inferred in RecoveryCompleted
* and probably useful to always have access to the state for the signals
* PartialFunction with (state,signal) tuple

* improve how to handle exceptions from signals
2019-04-01 16:33:34 +02:00
Patrik Nordwall
e3251660c8 remove State >: Null constraint in javadsl (#26645)
* it original reason was that this constraint was required by OptionVal,
  but that has been removed
2019-04-01 09:06:37 +01:00
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