* Stops entities of shard forcefully if they don't handle stopMessage #23751
* Prints a warning log while stopping the entities
* fix version of backward exclude file and checks for shard stopped
* adds documentation for handoff timeout
* =str ensure TcpStreamLogic sets cause of StreamTcpException
* =str make sure TcpStreamLogic will report connection errors to localAddressPromise if possible
* TLSSpec fix for Java 11 #25739
* =act silence logging in AsyncDns specs
* +act Add internal akka.util.JavaVersion for determining runtime Java version
* =act #25733 run TcpIntegrationSpec peers on different ActorSystems
* pro: add explicit dependency to activation when using dockerClient for JDK 11+
Otherwise, the log is spammed with lots of ClassNotFound exceptions when
running AsyncDnsResolverIntegrationSpec
* Adds tests on deprecated TTL Long values
* Replace primitive-based TTL with ADT+Duration
* Remove unnecessary scaladoc
* Rename vals to apropriate language
* Fix regression introduced on refactor
* Renames ADT after discussing on PR
* Adds mima rules
* Makes code internal. Improves usage of Duration API
* Fix previous commit
* Refactor: move CachePolicy to akka.io.dns.iternal, and wrap ADT in object
* Ttl is now a sealed abstract case class
* Makes CachePolicy public, ApiMayChange
* Fix code header
* Adds logging when falling back to default values
* Turns Ttl into a regular class with validation on constructor.
* Include apply, unapply, equals, hashCode, toString
* Fixes MiMa (new akka version happened)
* Makes Ttl final
* Simplifies equals and hashcode
* Replace apply in favor of fromPositive
* Improve misleading message
* Minor PR comment fixes
* Add Ttl.fromPositive(java.time.Duration)
* Log a warning if 'akka.remote.log-frame-size-exceeding' contains a bad value
Currently, if 'akka.remote.log-frame-size-exceeding' is accidentally set
to an invalid value (e.g. 'on') the developer does not get warned but
remote communication fails with a not-very-helpful error message:
```
[INFO] [06/29/2018 15:07:41.657] [run-main-0] [akka.remote.Remoting] Starting remoting
[INFO] [06/29/2018 15:07:41.847] [run-main-0] [akka.remote.Remoting] Remoting started; listening on addresses :[akka.tcp://akkaremotenull@localhost:2553]
[INFO] [06/29/2018 15:07:41.849] [run-main-0] [akka.remote.Remoting] Remoting now listens on addresses: [akka.tcp://akkaremotenull@localhost:2553]
[WARN] [06/29/2018 15:07:41.986] [akkaremotenull-akka.remote.default-remote-dispatcher-5] [akka.tcp://akkaremotenull@localhost:2553/system/endpointManager/reliableEndpointWriter-akka.tcp%3A%2F%2Fakkaremotenull%40localhost%3A2552-0] Association with remote system [akka.tcp://akkaremotenull@localhost:2552] has failed, address is now gated for [5000] ms. Reason: [akka://akkaremotenull/system/endpointManager/reliableEndpointWriter-akka.tcp%3A%2F%2Fakkaremotenull%40localhost%3A2552-0/endpointWriter: exception during creation] Caused by: [null]
[INFO] [06/29/2018 15:07:41.993] [akkaremotenull-akka.actor.default-dispatcher-3] [akka://akkaremotenull/deadLetters] Message [io.ino.akkaremotenull.Greeter$Greet] from Actor[akka://akkaremotenull/temp/$a] to Actor[akka://akkaremotenull/deadLetters] was not delivered. [1] dead letters encountered. If this is not an expected behavior, then [Actor[akka://akkaremotenull/deadLetters]] may have terminated unexpectedly, This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'.
```
This commit fixes the issue by a) printing a warning message and b)
ignoring the config setting.
* Adress review comments
Allows value 'off' for 'akka.remote.log-frame-size-exceeding' to be more
tolerant and now logs the original error message of the ConfigException
caught when parsing an invalid value:
```
[WARN] [07/05/2018 09:13:19.544] [akkaremotenull-akka.remote.default-remote-dispatcher-13] [RemoteMetricsOn(akka://akkaremotenull)] application.conf @ file:/Users/danbim/coding/akka-remote-null/target/scala-2.12/classes/application.conf: 19: Invalid value at 'akka.remote.log-frame-size-exceeding': No number in size-in-bytes value 'test'. For reference, check https://github.com/lightbend/config/blob/master/HOCON.md
```
* Check logFrameSizeExceeding against Int.MaxValue to allow JIT optimizations
* Load 'akka.remote.log-frame-size-exceeding' in RemoteSettings
Specifically:
* avoid "internal", as I initially though that meant the Akka framework's internal state of an actor
* dropped "started" in the context of recovering an actor: in order to recover you have to have been already started
* rather than refering to "changes", reference that what's persisted are the actor's received events
* some general English re-wording
* [ttk] Add access to logged events in BehaviorTestKit #25905
`BehaviorTestKit` now has methods to:
- Access to logged events
- Clear all log events
Added section in docs explaining how to check for logs.
Note about the implementation: `CapturedLogEvent` was effectively private to akka. It uses `OptionVal` internally, this makes it impossible to be used from outside akka. To overcome this, I added some methods to translate it to the corresponding `Option` and `Optional`.
* Apply feedback
Clean up `CapturedLogEvent` by using only `Option` in public methods
Use `immutable.Seq` instead of plain `Seq`
* !typ Change the ActorContext#ask in javadsl to accept a Duration instead of Timeout.
* !typ Change the ActorContext#setReceiveTimeout's parameter name from d to receiveTimeout.
* Replace TimerMsg hierarchy with a simple mix-in
* Fix a couple of typos
* Remove the need for a cast but just passing a log
* Remove the need for casts by making TimerInterceptor specify it handles Ts
* Prefer a sealed class to a sealed case class
* Tighten MatchError handling in fishForMessage
Avoid a whole bunch of other code being accidentally handled.
Also it allows for the inner 'loop' method to be @tailrec (next commit).
* Guarantee match exhaustion in fishForMessage
... by introducing FishingOutcome.ContinueOutcome to the type hierarchy.
* Simplify some timeout calculation in fishForMessage
'timeout' is always finite, as it's a `FiniteDuration`, and, even if it
weren't, the calculation is safe for non-finite durations.
* Make fishForMessage's inner loop @tailrec!
Apparently @tailrec and try/catch (with a re-throw in the catch) don't
mix well.
* Avoid double handing of timeouts in fishForMessage
If 'newTimeout' is sub-zero, just loop again which will trigger the
other throw.
* Make receiveOne return Option[M] rather than nullable M
Avoid future users from forgetting to consider the null case, which
happened in fishForMessage_internal.
* Switch to pattern matching Options
* Cast properly
Thanks, type inferencer, for inferring Nothing there! o_O
* Make fish's PartialFunction convenience explicit
* Update the scaladsl fishForMessage Scaladocs
* Restore MatchError catching logic & docs
TIL partial functions aren't of class PartialFunction anymore, they're
lambda classes.
* Tweak assertFail so it can be used more
* Avoid name shadowing
... on request. (I <3 name shadowing)
* Fix formatting