Commit graph

76 commits

Author SHA1 Message Date
Patrik Nordwall
0478d242e1
AccountExample in javadsl, #25485 (#25505) 2018-09-21 15:37:13 +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
10fc413238 Some usages of the removed signatures 2018-09-21 10:34:41 +02:00
Johan Andrén
f8d182574a Remove CommandHandler.byState #25655 2018-09-20 16:15:55 +02:00
Johan Andrén
5d129a804b Docs sample of accessing context from persistent behavior 2018-09-20 15:45:16 +02:00
Johan Andrén
68c4e14dbd Command context no longer needed 2018-09-20 15:03:12 +02:00
Johan Andrén
df697175b6 ActorContext removed from more signatures #25620 2018-09-20 14:59:41 +02:00
Johan Andrén
ad1eca9876 Remove the ActorContext parameter from the scaladsl command handler #25620 2018-09-20 13:48:13 +02:00
Patrik Nordwall
0804daf1a5 Simplify signature of ClusterSharding.spawn, #25480 2018-09-20 11:11:33 +02:00
Christopher Batey
1d0603dab9 make scalatest suite type agnostic 2018-09-17 17:54:54 +02:00
Patrik Nordwall
b16e4d5e4d ActorTestKit overhaul, #24598
* composition is the basic building block for ActorTestKit
* ActorTestKitWordSpec for integration with ScalaTest
  (automatic shutdown)

* Use ActorTestKitWordSpec in our own tests

* doc TestException
2018-09-17 17:00:15 +02:00
Johan Andrén
ab63fe037c Add BehaviorInterceptor and a more general way to traverse the behavior stack, #25504
* All nesting behaviors covered with an id parameter
* All wrapping behaviors except supervision replaced with new Intercept implementation
* Implement widen in terms of BehaviorInterceptor
* pass ctx to avoid allocation
2018-09-12 13:03:17 +02:00
Christopher Batey
131e6d10d6 Separate out Effects and ChainedEffects in typed persistence (#25357)
* Separate out Effects and ChainedEffects in typed persistence

* Document order of execution for ChainedEffects
* Change stop to a just a ChainedEffect rather than both

Closes #25042
Closes #25041

* ChainedEffect renamed to SideEffect
2018-08-03 17:15:49 +09:00
Christopher Batey
d8a47b6700
Switch order of javadsl EventHandler type params (#25354)
Closes #25188
2018-07-24 08:47:45 +01:00
Patrik Nordwall
67cc779ca6 Fix recovery timeout in Typed PersistentBehavior, #25268
* The TimerMsg was wrapped in IncomingCommand and therefore stashed,
  and when unstashed causing the ClassCastException
* Solved by not using timers here but plain scheduler
* Also fixing journalPluginId and snapshotPluginId
2018-07-11 10:25:42 +02:00
Christopher Batey
836347fe08 Typed persistence: Throw on persist failures, #24479
* Rather than stop so that users can add their own supervision e.g.
restartWithBackOff
* Only allow back off supervisoir for persistent behaviors
* Handle persist rejections
2018-07-09 10:57:36 +02:00
Patrik Nordwall
9cecba3455 Composable javadsl CommandHandlerBuilder, #25226 (#25227)
* Composable javadsl CommandHandlerBuilder, #25226
* CommandHandlerBuilder with stateClass and statePredicate parameters
* CommandHandlerBuilder.orElse
* Remove ActorContext from handler function signatures, can be
  passed in constructor
2018-07-06 15:35:07 +01:00
Christopher Batey
85754e8a2a Harden PersistentBehaviorSpec (#25301)
As the snapshot is async it might not be ready for the next part of the
test. Use a probe to make sure it is done.

Fixes #25296
2018-07-03 13:58:10 +02:00
Johan Andrén
6e5efccbd6
Fix failure in typed RecoveryPermitterSpec #25233 2018-07-03 12:10:40 +02:00
Patrik Nordwall
a30e039b04 remove andThen overload, #25133 2018-06-14 08:38:38 +02:00
Patrik Nordwall
7f8f3c122b
Merge pull request #25137 from akka/wip-24856-EventHandler-alias-patriknw
add EventHandler type alias, #24856
2018-06-05 10:54:12 +02:00
Viktor Klang (√)
eddc61af82 Documentation updates for Akka Persistence Typed (#25194)
* Switching to throwing exceptions in documentation suggestions
2018-06-05 09:49:01 +01:00
Patrik Nordwall
aceb4d6aa3 add EventHandler type alias, #24856
* for completeness, since we have one for CommandHandler, and sometimes
  it might be useful with the shorter type signature
* use the explicit function type for CommandHandler in API signatures,
  because it's easier to see what it actually is
2018-06-04 15:40:10 +02:00
Richard Imaoka
84d53d1ad1 Persistence: replace initialState with emptyState (#25129) 2018-05-25 14:29:22 +02:00
Christopher Batey
8eb7b1ea81
Typed persistent event adapters/wrappers (#25050)
Typed persistent event adapters/wrappers
2018-05-25 10:23:04 +01:00
Patrik Nordwall
b08d3acb4b Rename Typed TestKit, #25084
Artifact:
akka-testkit-typed -> akka-actor-testkit-typed

Package:
akka.testkit.typed -> akka.actor.testkit.typed

Config:
akka.typed -> akka.actor.typed
akka.testkit.typed -> akka.actor.testkit.typed
2018-05-21 11:51:51 +02:00
Oleksii Tkachuk
8af12295eb Issue 24687: Transfer of PerformanceSpec 2018-05-03 13:30:00 +02:00
Reza Rasouli
89b3820673 Documentation of wrapping PersistentBehavior in typed actor persistence #24679 (#24942)
* Documented wrapping PersistentBehavior in typed actors persistence documentation #24679

* Removed "Current Limitations" section
* Added description on wrapping PersistentBehavior
* Added Scala and Java example for the pattern

* updated persistence docs for the hinted changes

* added  missing "the" as requested in the  hint
2018-05-03 10:20:37 +02:00
Christopher Batey
188b74a013 Remove application.conf from typed test projects (#25015)
It breaks assembly for multi-jvm jobs. Only needs to be in
the tests project.
2018-04-30 10:58:35 +02:00
Christopher Batey
ea23b6ee18 Add classtag to tap/monitor for interception
Interception handles a message that is of the incorrect type as a result
of widening however tap/monitor passed Any as the classtag.
2018-04-23 16:47:56 +01:00
Oleksii Tkachuk
e18382bb0f Optional snapshot store spec #24687 2018-04-11 13:59:55 +02:00
Patrik Nordwall
90541b20db more efficient MDC in Typed persistence, #24787 2018-04-04 14:20:57 +02:00
Patrik Nordwall
ee85d23a3e use new Typed persistence impl in javadsl, #24753 (#24802)
* don't use untyped
* snapshot and tagging predicates
* onRecoveryCompleted
* actually run the java test by adding JUnitSuite
2018-04-02 11:59:41 +01:00
Patrik Nordwall
896aa7e33b use java.time.Duration in Typed javadsl, #24646 (#24804) 2018-04-02 08:30:49 +01:00
Johan Andrén
26f0f86088 Typed logging MDC improvements (#24729)
* No ClassTag needed for MDC and factory method updates #24684, #24664

* Lightweight way to do MDC: Logger.withMdc #24684

* Some MDC complications adressed

* Typed persistence MDC usage updated
2018-03-27 10:15:59 +02:00
Oleksii Tkachuk
f2d3a9dd27 Many recoveries spec: Transferred (#24767)
* Many recoveries spec: Transferred

* Many recoveries spec: Changes according to review.
2018-03-23 13:54:15 +09:00
Jimin Hsieh
3685ce619e Remove some of Unused import warning (#24750)
* Remove `Unused import` of `akka-actor-typed`

* Remove `Unused import` of `akka-actor-typed-tests`

* Remove `Unused import` of `akka-stream-tests`

* Remove `Unused import` of `akka-persistence`

* Remove `Unused import` of `akka-persistence-typed`

* Remove `Unused import` of `akka-cluster-typed`

* Remove `Unused import` of `akka-cluster-sharding-typed`

* Format source code
2018-03-20 12:01:15 +09:00
Konrad `ktoso` Malawski
b3fbf6869b
=typ #24683 Behaviors receive, receiveMessage, receivePartial, receiveMessagePartial (#24718)
* wip

* =typ #24683 Behaviors receive, receiveMessage, receivePartial,
receiveMessagePartial

* move MutableBehavior out as separate file

* receive, receiveSignal

* missing copy

* final cleanup

* cleanup, formatting
2018-03-20 00:20:13 +09:00
Patrik Nordwall
382e4d82b9 minor improvement of ClusterReceptionist loading (#24739) 2018-03-19 01:01:03 -07:00
Oleksii Tkachuk
36b69be4e4 Typed persistence tests: RecoveryPermitterSpec (#24748)
* Typed recovery permitter spec: Defined layout

* Typed recovery permitter spec: Defined initial spec

* Typed recovery permitter spec: Implemented 3 cases

* Typed recovery permitter spec: Finished complete initial implementation

* Typed recovery permitter spec: Removed unused class

* Typed recovery permitter spec: Renamed exception as per common practice
2018-03-19 15:19:05 +09:00
Konrad `ktoso` Malawski
563c7fbcf0 Issue 24594: Integration with sbt-headers and initial header population 2018-03-13 15:45:55 +01:00
Konrad Malawski
d3055a7f7f recovering = replaying naming change
make all matches exhaustive

internalStashOverflowStrategy should be initialized once
2018-03-13 00:40:13 +09:00
Patrik Nordwall
7304ae981b simplify pendingInvocations 2018-03-13 00:40:13 +09:00
Konrad Malawski
5be89dea71 cleanup and make snapshots work, make event timeout work too
sadly does not work without MODULE$ did a ticket for it
2018-03-13 00:40:13 +09:00
Patrik Nordwall
e61f833dc3 make PersistingEvent MutableBehavior
fix some tests, snapshots still not working
2018-03-13 00:40:13 +09:00
Patrik Nordwall
44445140f5 EventsourcedRunning, internalPersist, internalPersistAll
* I don't think the JournalInteractions should be conserned with
  next behavior
2018-03-13 00:40:13 +09:00
Patrik Nordwall
a05f50a0c0 reduce boilerplate for passing setup (and [C,E,S])
use an enclosing class that holds the setup
2018-03-13 00:40:13 +09:00
Konrad Malawski
ffb4419c4e WIP towards immutable style
compiles, does not work..
2018-03-13 00:40:13 +09:00
Johannes Rudolph
40abd2b096 Rename PersistentBehaviorImpl => EventsourcedSetup and pass setup around directly 2018-03-13 00:40:13 +09:00
Johannes Rudolph
a9293b3df2 Allow internal custom implementations of DeferredBehavior
Pass around context for stashing
2018-03-13 00:40:13 +09:00