{"action":"created","comment":{"url":"https://api.github.com/repos/akka/akka/pulls/comments/179575639","pull_request_review_id":109845891,"id":179575639,"diff_hunk":"@@ -139,6 +194,68 @@ object Backoff {\n     maxBackoff:   FiniteDuration,\n     randomFactor: Double): BackoffOptions =\n     BackoffOptionsImpl(StopImpliesFailure, childProps, childName, minBackoff, maxBackoff, randomFactor)\n+\n+  /**\n+   * Back-off options for creating a back-off supervisor actor that expects a child actor to stop on failure.\n+   *\n+   * This actor can be used to supervise a child actor and start it again\n+   * after a back-off duration if the child actor is stopped.\n+   *\n+   * This is useful in situations where the re-start of the child actor should be\n+   * delayed e.g. in order to give an external resource time to recover before the\n+   * child actor tries contacting it again (after being restarted).\n+   *\n+   * Specifically this pattern is useful for persistent actors,\n+   * which are stopped in case of persistence failures.\n+   * Just restarting them immediately would probably fail again (since the data\n+   * store is probably unavailable). It is better to try again after a delay.\n+   *\n+   * It supports exponential back-off between the given `minBackoff` and\n+   * `maxBackoff` durations. For example, if `minBackoff` is 3 seconds and\n+   * `maxBackoff` 30 seconds the start attempts will be delayed with\n+   * 3, 6, 12, 24, 30, 30 seconds. The exponential back-off counter is reset\n+   * if the actor is not terminated within the `minBackoff` duration.\n+   *\n+   * In addition to the calculated exponential back-off an additional\n+   * random delay based the given `randomFactor` is added, e.g. 0.2 adds up to 20%\n+   * delay. The reason for adding a random delay is to avoid that all failing\n+   * actors hit the backend resource at the same time.\n+   *\n+   * You can retrieve the current child `ActorRef` by sending `BackoffSupervisor.GetCurrentChild`\n+   * message to this actor and it will reply with [[akka.pattern.BackoffSupervisor.CurrentChild]]\n+   * containing the `ActorRef` of the current child, if any.\n+   *\n+   * The `BackoffSupervisor`delegates all messages from the child to the parent of the\n+   * `BackoffSupervisor`, with the supervisor as sender.\n+   *\n+   * The `BackoffSupervisor` forwards all other messages to the child, if it is currently running.\n+   *\n+   * The child can stop itself and send a [[akka.actor.PoisonPill]] to the parent supervisor\n+   * if it wants to do an intentional stop.\n+   *\n+   * Exceptions in the child are handled with the default supervisionStrategy, which can be changed by using\n+   * [[BackoffOptions#withSupervisorStrategy]] or [[BackoffOptions#withDefaultStoppingStrategy]]. A\n+   * `Restart` will perform a normal immediate restart of the child. A `Stop` will\n+   * stop the child, but it will be started again after the back-off duration.\n+   *\n+   * @param childProps the [[akka.actor.Props]] of the child actor that\n+   *   will be started and supervised\n+   * @param childName name of the child actor\n+   * @param minBackoff minimum (initial) duration until the child actor will\n+   *   started again, if it is terminated\n+   * @param maxBackoff the exponential back-off is capped to this duration\n+   * @param randomFactor after calculation of the exponential back-off an additional\n+   *   random delay based on this factor is added, e.g. `0.2` adds up to `20%` delay.\n+   *   In order to skip this additional delay pass in `0`.\n+   */\n+  def onStop(\n+    childProps:   Props,\n+    childName:    String,\n+    minBackoff:   java.time.Duration,\n+    maxBackoff:   java.time.Duration,\n+    randomFactor: Double): BackoffOptions =\n+    BackoffOptionsImpl(StopImpliesFailure, childProps, childName, minBackoff.asScala, maxBackoff.asScala, randomFactor)","path":"akka-actor/src/main/scala/akka/pattern/BackoffOptions.scala","position":133,"original_position":133,"commit_id":"9abc5ae89d6f7305607a2e0f2813cb9c08f208b3","original_commit_id":"9abc5ae89d6f7305607a2e0f2813cb9c08f208b3","user":{"login":"patriknw","id":336161,"avatar_url":"https://avatars3.githubusercontent.com/u/336161?v=4","gravatar_id":"","url":"https://api.github.com/users/patriknw","html_url":"https://github.com/patriknw","followers_url":"https://api.github.com/users/patriknw/followers","following_url":"https://api.github.com/users/patriknw/following{/other_user}","gists_url":"https://api.github.com/users/patriknw/gists{/gist_id}","starred_url":"https://api.github.com/users/patriknw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patriknw/subscriptions","organizations_url":"https://api.github.com/users/patriknw/orgs","repos_url":"https://api.github.com/users/patriknw/repos","events_url":"https://api.github.com/users/patriknw/events{/privacy}","received_events_url":"https://api.github.com/users/patriknw/received_events","type":"User","site_admin":false},"body":"^ and same here","created_at":"2018-04-05T19:27:19Z","updated_at":"2018-04-05T19:30:48Z","html_url":"https://github.com/akka/akka/pull/24735#discussion_r179575639","pull_request_url":"https://api.github.com/repos/akka/akka/pulls/24735","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/akka/akka/pulls/comments/179575639"},"html":{"href":"https://github.com/akka/akka/pull/24735#discussion_r179575639"},"pull_request":{"href":"https://api.github.com/repos/akka/akka/pulls/24735"}}},"pull_request":{"url":"https://api.github.com/repos/akka/akka/pulls/24735","id":175395986,"html_url":"https://github.com/akka/akka/pull/24735","diff_url":"https://github.com/akka/akka/pull/24735.diff","patch_url":"https://github.com/akka/akka/pull/24735.patch","issue_url":"https://api.github.com/repos/akka/akka/issues/24735","number":24735,"state":"open","locked":false,"title":"Add java.time.Duration support in the JavaDSL in akka-actor module #24646","user":{"login":"ralphlaude","id":2743423,"avatar_url":"https://avatars0.githubusercontent.com/u/2743423?v=4","gravatar_id":"","url":"https://api.github.com/users/ralphlaude","html_url":"https://github.com/ralphlaude","followers_url":"https://api.github.com/users/ralphlaude/followers","following_url":"https://api.github.com/users/ralphlaude/following{/other_user}","gists_url":"https://api.github.com/users/ralphlaude/gists{/gist_id}","starred_url":"https://api.github.com/users/ralphlaude/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ralphlaude/subscriptions","organizations_url":"https://api.github.com/users/ralphlaude/orgs","repos_url":"https://api.github.com/users/ralphlaude/repos","events_url":"https://api.github.com/users/ralphlaude/events{/privacy}","received_events_url":"https://api.github.com/users/ralphlaude/received_events","type":"User","site_admin":false},"body":"Hey guys,\r\n\r\nthis is a WIP Pull Request for adding the java.time.Duration in the akka JavaDSL.\r\nFor now this is only implemented for the akka-actor module.\r\nPlease make a review and any comment would be appreciate.\r\n\r\nThanks","created_at":"2018-03-15T22:30:23Z","updated_at":"2018-04-05T19:30:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"34e5b70d005c4547797e246aa7403ecda06e4d25","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":37797348,"url":"https://api.github.com/repos/akka/akka/labels/needs-attention","name":"needs-attention","color":"e10c02","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/akka/akka/pulls/24735/commits","review_comments_url":"https://api.github.com/repos/akka/akka/pulls/24735/comments","review_comment_url":"https://api.github.com/repos/akka/akka/pulls/comments{/number}","comments_url":"https://api.github.com/repos/akka/akka/issues/24735/comments","statuses_url":"https://api.github.com/repos/akka/akka/statuses/9abc5ae89d6f7305607a2e0f2813cb9c08f208b3","head":{"label":"ralphlaude:wip-java-time-duration-support-for-javadsl","ref":"wip-java-time-duration-support-for-javadsl","sha":"9abc5ae89d6f7305607a2e0f2813cb9c08f208b3","user":{"login":"ralphlaude","id":2743423,"avatar_url":"https://avatars0.githubusercontent.com/u/2743423?v=4","gravatar_id":"","url":"https://api.github.com/users/ralphlaude","html_url":"https://github.com/ralphlaude","followers_url":"https://api.github.com/users/ralphlaude/followers","following_url":"https://api.github.com/users/ralphlaude/following{/other_user}","gists_url":"https://api.github.com/users/ralphlaude/gists{/gist_id}","starred_url":"https://api.github.com/users/ralphlaude/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ralphlaude/subscriptions","organizations_url":"https://api.github.com/users/ralphlaude/orgs","repos_url":"https://api.github.com/users/ralphlaude/repos","events_url":"https://api.github.com/users/ralphlaude/events{/privacy}","received_events_url":"https://api.github.com/users/ralphlaude/received_events","type":"User","site_admin":false},"repo":{"id":122994976,"name":"akka","full_name":"ralphlaude/akka","owner":{"login":"ralphlaude","id":2743423,"avatar_url":"https://avatars0.githubusercontent.com/u/2743423?v=4","gravatar_id":"","url":"https://api.github.com/users/ralphlaude","html_url":"https://github.com/ralphlaude","followers_url":"https://api.github.com/users/ralphlaude/followers","following_url":"https://api.github.com/users/ralphlaude/following{/other_user}","gists_url":"https://api.github.com/users/ralphlaude/gists{/gist_id}","starred_url":"https://api.github.com/users/ralphlaude/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ralphlaude/subscriptions","organizations_url":"https://api.github.com/users/ralphlaude/orgs","repos_url":"https://api.github.com/users/ralphlaude/repos","events_url":"https://api.github.com/users/ralphlaude/events{/privacy}","received_events_url":"https://api.github.com/users/ralphlaude/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ralphlaude/akka","description":"Build highly concurrent, distributed, and resilient message-driven applications on the JVM","fork":true,"url":"https://api.github.com/repos/ralphlaude/akka","forks_url":"https://api.github.com/repos/ralphlaude/akka/forks","keys_url":"https://api.github.com/repos/ralphlaude/akka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ralphlaude/akka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ralphlaude/akka/teams","hooks_url":"https://api.github.com/repos/ralphlaude/akka/hooks","issue_events_url":"https://api.github.com/repos/ralphlaude/akka/issues/events{/number}","events_url":"https://api.github.com/repos/ralphlaude/akka/events","assignees_url":"https://api.github.com/repos/ralphlaude/akka/assignees{/user}","branches_url":"https://api.github.com/repos/ralphlaude/akka/branches{/branch}","tags_url":"https://api.github.com/repos/ralphlaude/akka/tags","blobs_url":"https://api.github.com/repos/ralphlaude/akka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ralphlaude/akka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ralphlaude/akka/git/refs{/sha}","trees_url":"https://api.github.com/repos/ralphlaude/akka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ralphlaude/akka/statuses/{sha}","languages_url":"https://api.github.com/repos/ralphlaude/akka/languages","stargazers_url":"https://api.github.com/repos/ralphlaude/akka/stargazers","contributors_url":"https://api.github.com/repos/ralphlaude/akka/contributors","subscribers_url":"https://api.github.com/repos/ralphlaude/akka/subscribers","subscription_url":"https://api.github.com/repos/ralphlaude/akka/subscription","commits_url":"https://api.github.com/repos/ralphlaude/akka/commits{/sha}","git_commits_url":"https://api.github.com/repos/ralphlaude/akka/git/commits{/sha}","comments_url":"https://api.github.com/repos/ralphlaude/akka/comments{/number}","issue_comment_url":"https://api.github.com/repos/ralphlaude/akka/issues/comments{/number}","contents_url":"https://api.github.com/repos/ralphlaude/akka/contents/{+path}","compare_url":"https://api.github.com/repos/ralphlaude/akka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ralphlaude/akka/merges","archive_url":"https://api.github.com/repos/ralphlaude/akka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ralphlaude/akka/downloads","issues_url":"https://api.github.com/repos/ralphlaude/akka/issues{/number}","pulls_url":"https://api.github.com/repos/ralphlaude/akka/pulls{/number}","milestones_url":"https://api.github.com/repos/ralphlaude/akka/milestones{/number}","notifications_url":"https://api.github.com/repos/ralphlaude/akka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ralphlaude/akka/labels{/name}","releases_url":"https://api.github.com/repos/ralphlaude/akka/releases{/id}","deployments_url":"https://api.github.com/repos/ralphlaude/akka/deployments","created_at":"2018-02-26T16:12:49Z","updated_at":"2018-02-26T16:13:03Z","pushed_at":"2018-03-30T13:08:11Z","git_url":"git://github.com/ralphlaude/akka.git","ssh_url":"git@github.com:ralphlaude/akka.git","clone_url":"https://github.com/ralphlaude/akka.git","svn_url":"https://github.com/ralphlaude/akka","homepage":"http://akka.io","size":209674,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"akka:master","ref":"master","sha":"ea9b7c99710ded15e2730141b9946647639446ac","user":{"login":"akka","id":1496237,"avatar_url":"https://avatars2.githubusercontent.com/u/1496237?v=4","gravatar_id":"","url":"https://api.github.com/users/akka","html_url":"https://github.com/akka","followers_url":"https://api.github.com/users/akka/followers","following_url":"https://api.github.com/users/akka/following{/other_user}","gists_url":"https://api.github.com/users/akka/gists{/gist_id}","starred_url":"https://api.github.com/users/akka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akka/subscriptions","organizations_url":"https://api.github.com/users/akka/orgs","repos_url":"https://api.github.com/users/akka/repos","events_url":"https://api.github.com/users/akka/events{/privacy}","received_events_url":"https://api.github.com/users/akka/received_events","type":"Organization","site_admin":false},"repo":{"id":130013,"name":"akka","full_name":"akka/akka","owner":{"login":"akka","id":1496237,"avatar_url":"https://avatars2.githubusercontent.com/u/1496237?v=4","gravatar_id":"","url":"https://api.github.com/users/akka","html_url":"https://github.com/akka","followers_url":"https://api.github.com/users/akka/followers","following_url":"https://api.github.com/users/akka/following{/other_user}","gists_url":"https://api.github.com/users/akka/gists{/gist_id}","starred_url":"https://api.github.com/users/akka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akka/subscriptions","organizations_url":"https://api.github.com/users/akka/orgs","repos_url":"https://api.github.com/users/akka/repos","events_url":"https://api.github.com/users/akka/events{/privacy}","received_events_url":"https://api.github.com/users/akka/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/akka/akka","description":"Build highly concurrent, distributed, and resilient message-driven applications on the JVM","fork":false,"url":"https://api.github.com/repos/akka/akka","forks_url":"https://api.github.com/repos/akka/akka/forks","keys_url":"https://api.github.com/repos/akka/akka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/akka/akka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/akka/akka/teams","hooks_url":"https://api.github.com/repos/akka/akka/hooks","issue_events_url":"https://api.github.com/repos/akka/akka/issues/events{/number}","events_url":"https://api.github.com/repos/akka/akka/events","assignees_url":"https://api.github.com/repos/akka/akka/assignees{/user}","branches_url":"https://api.github.com/repos/akka/akka/branches{/branch}","tags_url":"https://api.github.com/repos/akka/akka/tags","blobs_url":"https://api.github.com/repos/akka/akka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/akka/akka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/akka/akka/git/refs{/sha}","trees_url":"https://api.github.com/repos/akka/akka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/akka/akka/statuses/{sha}","languages_url":"https://api.github.com/repos/akka/akka/languages","stargazers_url":"https://api.github.com/repos/akka/akka/stargazers","contributors_url":"https://api.github.com/repos/akka/akka/contributors","subscribers_url":"https://api.github.com/repos/akka/akka/subscribers","subscription_url":"https://api.github.com/repos/akka/akka/subscription","commits_url":"https://api.github.com/repos/akka/akka/commits{/sha}","git_commits_url":"https://api.github.com/repos/akka/akka/git/commits{/sha}","comments_url":"https://api.github.com/repos/akka/akka/comments{/number}","issue_comment_url":"https://api.github.com/repos/akka/akka/issues/comments{/number}","contents_url":"https://api.github.com/repos/akka/akka/contents/{+path}","compare_url":"https://api.github.com/repos/akka/akka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/akka/akka/merges","archive_url":"https://api.github.com/repos/akka/akka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/akka/akka/downloads","issues_url":"https://api.github.com/repos/akka/akka/issues{/number}","pulls_url":"https://api.github.com/repos/akka/akka/pulls{/number}","milestones_url":"https://api.github.com/repos/akka/akka/milestones{/number}","notifications_url":"https://api.github.com/repos/akka/akka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/akka/akka/labels{/name}","releases_url":"https://api.github.com/repos/akka/akka/releases{/id}","deployments_url":"https://api.github.com/repos/akka/akka/deployments","created_at":"2009-02-16T12:51:54Z","updated_at":"2018-04-05T15:04:34Z","pushed_at":"2018-04-05T16:46:02Z","git_url":"git://github.com/akka/akka.git","ssh_url":"git@github.com:akka/akka.git","clone_url":"https://github.com/akka/akka.git","svn_url":"https://github.com/akka/akka","homepage":"http://akka.io","size":210052,"stargazers_count":8381,"watchers_count":8381,"language":"Scala","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2669,"mirror_url":null,"archived":false,"open_issues_count":680,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":2669,"open_issues":680,"watchers":8381,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/akka/akka/pulls/24735"},"html":{"href":"https://github.com/akka/akka/pull/24735"},"issue":{"href":"https://api.github.com/repos/akka/akka/issues/24735"},"comments":{"href":"https://api.github.com/repos/akka/akka/issues/24735/comments"},"review_comments":{"href":"https://api.github.com/repos/akka/akka/pulls/24735/comments"},"review_comment":{"href":"https://api.github.com/repos/akka/akka/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/akka/akka/pulls/24735/commits"},"statuses":{"href":"https://api.github.com/repos/akka/akka/statuses/9abc5ae89d6f7305607a2e0f2813cb9c08f208b3"}},"author_association":"NONE"}}
{"actor":{"display_login":"patriknw"}}