Commit graph

192 commits

Author SHA1 Message Date
Konrad 'ktoso' Malawski
a71790bb18 +per #15229 defer for PersistentActor
* Deferred events are not persisted, thus will not participate in replays
  etc. If users want events to be persisted, they can simply use
  `persistAsync` instead.
* This, 3rd, rewrite extends the Persistent hierarchy by a top level
  trait "Resequenceable", which is used to mark every event to be sent
  in sequence back to the PersistentActor. These are split into
  NonPersistentRepr or PersistentRepr, and acted upon accordingly.
* defer is guaranteed to be called, even after persistence failures
* Includes docs updates for java/scala/java8

Resolves #15229
Depends on #15227

Conflicts:
	akka-docs/rst/scala/code/docs/persistence/PersistenceDocSpec.scala
	akka-persistence/src/main/scala/akka/persistence/JournalProtocol.scala
	akka-persistence/src/main/scala/akka/persistence/Processor.scala
	akka-persistence/src/test/scala/akka/persistence/PersistentActorSpec.scala
	project/AkkaBuild.scala
2014-06-10 17:09:24 +02:00
Björn Antonsson
9bcaeff87d +per #13944 Send RecoveryComplete message at end of recovery
Fixes #13944

Conflicts:
	akka-docs/rst/scala/code/docs/persistence/PersistenceDocSpec.scala
	akka-persistence/src/main/scala/akka/persistence/Processor.scala
	project/AkkaBuild.scala
2014-06-10 13:22:10 +02:00
Konrad 'ktoso' Malawski
d51b79c95a !per persistAsync
Breaks binary compatibility because adding new methods to Eventsourced
trait. Since akka-persistence is experimental this is ok, yet
source-level compatibility has been perserved thankfuly :-)

Deprecates:
* Rename of EventsourcedProcessor -> PersistentActor
* Processor -> suggest using PersistentActor
* Migration guide for akka-persistence is separate, as wel'll deprecate in minor versions (its experimental)
* Persistent as well as ConfirmablePersistent - since Processor, their
  main user will be removed soon.

Other changes:
* persistAsync works as expected when mixed with persist
* A counter must be kept for pending stashing invocations
* Uses only 1 shared list buffer for persit / persistAsync
* Includes small benchmark
* Docs also include info about not using Persistent() wrapper
* uses java LinkedList, for best performance of append / head on
  persistInvocations; the get(0) is safe, because these msgs only
  come in response to persistInvocations
* Renamed internal *MessagesSuccess/Failure messages because we kept
  small mistakes seeing the class "with s" and "without s" as the same
* Updated everything that refered to EventsourcedProcessor to
  PersistentActor, including samples

Refs #15227

Conflicts:
	akka-docs/rst/project/migration-guides.rst
	akka-persistence/src/main/scala/akka/persistence/JournalProtocol.scala
	akka-persistence/src/main/scala/akka/persistence/Persistent.scala
	akka-persistence/src/test/scala/akka/persistence/PersistentActorSpec.scala
	project/AkkaBuild.scala
2014-06-10 11:09:12 +02:00
Konrad Malawski
c046cdff0a !act,doc #3893 Removed isTerminated checks from ActorClassification
Instead of isTerminated we now use death watch on subscribers.

! Breaking change - ActorClassification based event buses now require
  and actor system. Previously no actors were involved, but now someone
  has to `watch` the subscribers. The unsubscriber is an system actor,
  and won't be stopped automagically if a bus stops to be used (hard to
  determine what "stops being used" is)
* Replaced isTerminated checks with watching actors
* backing structure for ActorClassification swaped from
  ConcurrentHashMap to immutable.Map with CAS operations on it. This is
  required to avoid races and guarantee register/unregister ordering
  (messages sent with proper sequence numbers) to the unsubscriber.
  Performance tested it and still above 1.3million subscribe+unsubscribe
  ops per second (mac i7, retina), where as the CHM version was
  4 million - but that one could only work in the presence of
  itTerminated - so we pay the price here for removing it.
* `ActorClassification` starts the unsubscriber instance by itself,
  the unsubscriber is an system actor, and can be stopped via
  `ActorClassification#shutdown`
* Will unregister from unsubscriber, when no more subscriptions for
  given subscriber are left in this bus.
* Added missing "Java API: " for some types
* Updated docs to point out the automatic subscriber purging (on terminated)
2014-04-24 14:08:07 +02:00
Patrik Nordwall
c1f7d7fa21 =doc #3924 Doc how to be notified when recovery completed 2014-03-25 10:46:05 +01:00
Roland Kuhn
dc305eaf18 +act #3949 add LoggingReceive.withLabel
def someState = LoggingReceive.withLabel("some state") {
  case msg => ...
}
2014-03-21 20:43:13 +01:00
Roland Kuhn
ac5f4fc72e Merge pull request #2050 from drexin/wip-3246-priority-mailbox-drexin
+act #3246 Added control aware mailbox types
2014-03-11 19:36:04 +01:00
Dario Rexin
c3950a7525 +act #3246 Added control aware mailbox types 2014-03-11 17:03:05 +01:00
dario.rexin
2cbad298d6 =all #3858 Make case classes final 2014-03-07 13:20:01 +01:00
Björn Antonsson
96be914979 Merge pull request #2052 from akka/wip-3900-systemActorOf-∂π
+act #3900 make systemActorOf available to Extensions
2014-03-04 13:32:12 +01:00
Roland Kuhn
b5eeb08fde +act #3900 make systemActorOf available to Extensions 2014-03-03 12:00:25 +01:00
Björn Antonsson
0dcb6d6654 !act,doc #3831 Adding more Java with Lambda documentation and support
* The Java with Lambda support documentation for AbstractActor and AbstractFSM are now on par with Scala
* Many small fixes and additions of missing things
* Added an AbstractActorContext that has convenience functions for getChild and getChildren
2014-03-03 10:18:58 +01:00
Konrad Malawski
b7dd2a6af5 =doc #3886 improved example of PartialFunction.orElse composition
Changed orElse composition example to better highlight it's
possibilities. This is a follow up PR based on a discussion on
akka-user: https://groups.google.com/forum/#!topic/akka-user/vVUZPMeJmzw
2014-02-20 09:19:04 +00:00
Patrik Nordwall
57d831716a Merge pull request #2004 from akka/wip-3868-doc-remote-router-group-patriknw
=doc #3868 Clarify remote router group
2014-02-13 12:46:17 +01:00
Patrik Nordwall
cafa6585ce =doc #3868 Clarify remote router group 2014-02-13 12:45:42 +01:00
Patrik Nordwall
a247365b57 !act,doc #2922 Doc event bus and fix Java API 2014-02-13 12:23:51 +01:00
Patrik Nordwall
f1edf78979 Merge pull request #1980 from vossad01/wip-3838-SetCopyrightYear2014-vossad01
Update Copyright to 2014, see #3838
2014-02-06 11:14:38 +01:00
Adam Voss
cce29dfa51 Changes all occurances of Typesafe copyright to extend to 2014. 2014-02-04 21:20:09 -06:00
Patrik Nordwall
5650998ede Merge pull request #1967 from dhobi/master
=doc Explaining how to deal with Exceptions in TypedActor
2014-02-03 02:44:41 -08:00
Björn Antonsson
179faba453 =all #3837 Make akkaScalaNightly compile on scala 2.11.0-M8 2014-01-31 14:13:02 +01:00
Daniel Hobi
c63586730c =doc Explaining how to deal with Exceptions in TypedActor 2014-01-24 16:16:35 +01:00
Patrik Nordwall
d0f9c8f2fc Merge pull request #1953 from akka/wip-3102-remove-ComposableActor-patriknw
=doc #3102 Remove ComposableActor doc sample
2014-01-22 07:32:11 -08:00
Patrik Nordwall
7bae3082aa =doc #3102 Remove ComposableActor doc sample 2014-01-22 09:18:20 +01:00
Patrik Nordwall
d506f6df4f +act #3513 Clarify gracefulStop stopMessage, and add Java API 2014-01-21 17:15:09 +01:00
Patrik Nordwall
8ec581c808 Merge pull request #1935 from drexin/wip-3544-improve-testkit
+tes Added system as default param to TestKit.shutdown
2014-01-20 05:12:17 -08:00
Patrik Nordwall
10fbdd2db8 Merge pull request #1939 from krasserm/wip-3828-rename-recreiveReplay-krasserm
!per #3828 Rename receiveReplay to receiveRecover
2014-01-20 02:53:51 -08:00
Patrik Nordwall
37eddd716c Merge pull request #1936 from akka/wip-3738-memory-leaks-in-tests-patriknw
=act #3738 Fix memory leaks in tests
2014-01-20 02:51:49 -08:00
Martin Krasser
e0f5cf5f2c !per #3828 Rename receiveReplay to receiveRecover
- because it handles messages related to recovery (snapshots and replayed messages)
2014-01-19 17:46:32 +01:00
Dario Rexin
e045c537a3 !tes #3544 Added 'system' as default parameter to the shutdown method on
TestKit
2014-01-17 23:08:32 +01:00
drewhk
1db16428da Merge pull request #1909 from drewhk/wip-io-read-throtting-drewhk
+act #3586 #3807 Implement mandatory read throttling
2014-01-17 11:53:23 -08:00
Endre Sándor Varga
487083a9c3 +act #3586 #3807 Implement mandatory read throttling 2014-01-17 18:27:56 +01:00
Patrik Nordwall
a11fb1dafc =act #3572 Add parens to sender
* because it is not referentially transparent; normally we reserved parens for
  side-effecting code but given how people thoughtlessly close over it we revised
  that that decision for sender
* caller can still omit parens
2014-01-17 18:21:14 +01:00
Patrik Nordwall
537840bd2a Merge pull request #1931 from drewhk/wip-3689-remove-typed-channels-drewhk
!cha #3789: Remove typed channels
2014-01-17 09:10:06 -08:00
Patrik Nordwall
9eb32a4486 =act #3738 Fix memory leaks in tests
* afterAll not called when all tests marked as ignore,
  invokeBeforeAllAndAfterAllEvenIfNoTestsAreExpected = true
  should solve that, but changed to pending in Ticket1978 anyway
* Try to shutdown when ActorSystem init fails. It is difficult
  to cover all scenarios, but this should improve the situation.
  This was the reason why DeployerSpec leaked.
* missing shutdown in some tests
2014-01-17 16:18:35 +01:00
Endre Sándor Varga
293dd0b9d2 !act #3812: Remove Pipelines 2014-01-17 15:52:24 +01:00
Patrik Nordwall
8d2bc2bc40 Merge pull request #1915 from krasserm/wip-3704-persistence-improvements-part-1-krassserm
!per #3704 Persistence improvement (part 1)
2014-01-17 06:37:52 -08:00
Roland Kuhn
453815c073 Merge pull request #1933 from akka/wip-3764-props-docs-∂π
clean up docs and deprecation around how to create Props
2014-01-17 05:57:37 -08:00
Endre Sándor Varga
31c4d76ba7 !cha #3789: Remove typed channels 2014-01-17 14:56:51 +01:00
Martin Krasser
f327e1e357 !per #3704 Persistence improvements
- Channel enhancements (#3773):
- Live read models (#3776):
- Batch-oriented journal plugin API (#3804):
- Batching of confirmations and deletions
- Message deletion enhancements (more efficient range deletions)
2014-01-17 13:36:55 +01:00
Patrik Nordwall
2e16b570e9 Merge pull request #1927 from drexin/wip-3816-drexin
!doc #3816 Remove Scala code from config examples in docs
2014-01-17 02:24:05 -08:00
Roland Kuhn
5bcb750441 !act,doc,rem,tes 3823 remove deprecated Props methods
- rewrite deprecated usages to their recommended counterparts
- TestActorRef now verifies mailbox requirements
- CallingThreadMailbox now exposes proper messageQueue type for
  inspection
2014-01-17 09:12:44 +01:00
Roland Kuhn
780831469c =doc 3764 revise recommended practice for Props creation
- it is not recommended to use Props.apply(=> Actor) within an Actor
- it is recommended to use that method in the Props factory method in
  an actor’s companion object
2014-01-16 22:44:03 +01:00
Patrik Nordwall
d7aab50da0 !act #2927 Add BalancingPool and deprecate BalancingDispatcher 2014-01-16 19:06:42 +01:00
dario.rexin
39dd4d3fea +doc #3816 Removed surrounding scala code from config examples in docs 2014-01-16 15:09:29 +01:00
Patrik Nordwall
7648a50d53 +act #3769 Add toStringWithoutAddress to ActorPath 2014-01-15 15:05:52 +01:00
Björn Antonsson
003609c9c5 =pro #3759 Changed to using non-deprecated ScalaTest Matchers 2013-12-18 11:32:51 +01:00
Björn Antonsson
5935e2e2b7 =doc #3782 Make IODocSpec say what went wrong 2013-12-13 14:28:39 +01:00
Patrik Nordwall
dd3d3da452 =tra #3668 Deprecate transactors 2013-12-13 11:00:06 +01:00
Patrik Nordwall
4bd1586b1e =dur #3664 Deprecate durable mailboxes 2013-12-13 07:38:15 +01:00
Patrik Nordwall
66e4008494 =dat #3780 Deprecate dataflow 2013-12-12 21:44:50 +01:00