{"action":"created","comment":{"url":"https://api.github.com/repos/apache/incubator-beam/pulls/comments/83523881","pull_request_review_id":4365406,"id":83523881,"diff_hunk":"@@ -0,0 +1,57 @@\n+/*\n+ * Licensed to the Apache Software Foundation (ASF) under one\n+ * or more contributor license agreements.  See the NOTICE file\n+ * distributed with this work for additional information\n+ * regarding copyright ownership.  The ASF licenses this file\n+ * to you under the Apache License, Version 2.0 (the\n+ * \"License\"); you may not use this file except in compliance\n+ * with the License.  You may obtain a copy of the License at\n+ *\n+ *     http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+package org.apache.beam.sdk.util;\n+\n+import org.apache.beam.sdk.annotations.Experimental;\n+import org.apache.beam.sdk.transforms.DoFn;\n+import org.joda.time.Instant;\n+\n+/**\n+ * A timer for a specified time domain that can be set to register the desire for further processing\n+ * at particular time (in some time domain).\n+ *\n+ * <p>See {@link TimeDomain} for details on the time domains available.\n+ *\n+ * <p>In a {@link DoFn}, a {@link Timer} is specified by a {@link TimerSpec} annotated with {@link\n+ * DoFn.TimerId}.\n+ *\n+ * <p>A timer exists in one of two states: set or unset. A timer can be set only for a single time.\n+ *\n+ * <p>Timers are not guaranteed to fire synchronously, but will be delivered at some time after the\n+ * requested time.\n+ *\n+ * <p>An implementation of {@link Timer} is implicitly scoped - it may be scoped to a key and\n+ * window, or a key, window, and trigger, etc.\n+ *\n+ * <p>Timers for the same {@link TimeDomain} and the same scope (for example, the same key and\n+ * window) will be delivered in order of their timestamps.\n+ */\n+@Experimental(Experimental.Kind.TIMERS)\n+public interface Timer {\n+  /**\n+   * Sets or resets the time at which this timer should fire. If the timer was already set, resets","path":"sdks/java/core/src/main/java/org/apache/beam/sdk/util/Timer.java","position":null,"original_position":47,"commit_id":"d80d0fbc01412b6e353126f4c7784dcf054fba76","original_commit_id":"83ab0f8124352b58b3ca069248f1976e9dce2f3e","user":{"login":"kennknowles","id":575353,"avatar_url":"https://avatars.githubusercontent.com/u/575353?v=3","gravatar_id":"","url":"https://api.github.com/users/kennknowles","html_url":"https://github.com/kennknowles","followers_url":"https://api.github.com/users/kennknowles/followers","following_url":"https://api.github.com/users/kennknowles/following{/other_user}","gists_url":"https://api.github.com/users/kennknowles/gists{/gist_id}","starred_url":"https://api.github.com/users/kennknowles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kennknowles/subscriptions","organizations_url":"https://api.github.com/users/kennknowles/orgs","repos_url":"https://api.github.com/users/kennknowles/repos","events_url":"https://api.github.com/users/kennknowles/events{/privacy}","received_events_url":"https://api.github.com/users/kennknowles/received_events","type":"User","site_admin":false},"body":"Done.","created_at":"2016-10-15T02:18:02Z","updated_at":"2016-10-15T02:43:14Z","html_url":"https://github.com/apache/incubator-beam/pull/1102#discussion_r83523881","pull_request_url":"https://api.github.com/repos/apache/incubator-beam/pulls/1102","_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-beam/pulls/comments/83523881"},"html":{"href":"https://github.com/apache/incubator-beam/pull/1102#discussion_r83523881"},"pull_request":{"href":"https://api.github.com/repos/apache/incubator-beam/pulls/1102"}}},"pull_request":{"url":"https://api.github.com/repos/apache/incubator-beam/pulls/1102","id":89331007,"html_url":"https://github.com/apache/incubator-beam/pull/1102","diff_url":"https://github.com/apache/incubator-beam/pull/1102.diff","patch_url":"https://github.com/apache/incubator-beam/pull/1102.patch","issue_url":"https://api.github.com/repos/apache/incubator-beam/issues/1102","number":1102,"state":"open","locked":false,"title":"[BEAM-27] Add initial bits for DoFn Timer API","user":{"login":"kennknowles","id":575353,"avatar_url":"https://avatars.githubusercontent.com/u/575353?v=3","gravatar_id":"","url":"https://api.github.com/users/kennknowles","html_url":"https://github.com/kennknowles","followers_url":"https://api.github.com/users/kennknowles/followers","following_url":"https://api.github.com/users/kennknowles/following{/other_user}","gists_url":"https://api.github.com/users/kennknowles/gists{/gist_id}","starred_url":"https://api.github.com/users/kennknowles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kennknowles/subscriptions","organizations_url":"https://api.github.com/users/kennknowles/orgs","repos_url":"https://api.github.com/users/kennknowles/repos","events_url":"https://api.github.com/users/kennknowles/events{/privacy}","received_events_url":"https://api.github.com/users/kennknowles/received_events","type":"User","site_admin":false},"body":"Be sure to do all of the following to help us incorporate your contribution\r\nquickly and easily:\r\n\r\n - [x] Make sure the PR title is formatted like:\r\n   `[BEAM-<Jira issue #>] Description of pull request`\r\n - [ ] Make sure tests pass via `mvn clean verify`. (Even better, enable\r\n       Travis-CI on your fork and ensure the whole test matrix passes).\r\n - [x] Replace `<Jira issue #>` in the title with the actual Jira issue\r\n       number, if there is one.\r\n - [x] If this contribution is large, please file an Apache\r\n       [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.txt).\r\n\r\n---\r\n\r\nR: @jkff \r\nCC: @bjchambers who gave lots of good feedback on the `StateSpec` version of this PR. Time permitting, see if you have opinions about this simpler one.\r\n\r\nThis adds the interfaces and annotations from the design for the user-facing timer API, with basic reflection and validation and some tests.\r\n\r\n(while putting this together, I noticed that there were state examples that were invalid in ways other than the way they were testing, so that commit is in this PR too)","created_at":"2016-10-14T06:31:53Z","updated_at":"2016-10-15T02:43:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5e1fbfade299c90b8259d53762b3ea52acd5c503","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/incubator-beam/pulls/1102/commits","review_comments_url":"https://api.github.com/repos/apache/incubator-beam/pulls/1102/comments","review_comment_url":"https://api.github.com/repos/apache/incubator-beam/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/incubator-beam/issues/1102/comments","statuses_url":"https://api.github.com/repos/apache/incubator-beam/statuses/d80d0fbc01412b6e353126f4c7784dcf054fba76","head":{"label":"kennknowles:TimerSpec","ref":"TimerSpec","sha":"d80d0fbc01412b6e353126f4c7784dcf054fba76","user":{"login":"kennknowles","id":575353,"avatar_url":"https://avatars.githubusercontent.com/u/575353?v=3","gravatar_id":"","url":"https://api.github.com/users/kennknowles","html_url":"https://github.com/kennknowles","followers_url":"https://api.github.com/users/kennknowles/followers","following_url":"https://api.github.com/users/kennknowles/following{/other_user}","gists_url":"https://api.github.com/users/kennknowles/gists{/gist_id}","starred_url":"https://api.github.com/users/kennknowles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kennknowles/subscriptions","organizations_url":"https://api.github.com/users/kennknowles/orgs","repos_url":"https://api.github.com/users/kennknowles/repos","events_url":"https://api.github.com/users/kennknowles/events{/privacy}","received_events_url":"https://api.github.com/users/kennknowles/received_events","type":"User","site_admin":false},"repo":{"id":52646147,"name":"incubator-beam","full_name":"kennknowles/incubator-beam","owner":{"login":"kennknowles","id":575353,"avatar_url":"https://avatars.githubusercontent.com/u/575353?v=3","gravatar_id":"","url":"https://api.github.com/users/kennknowles","html_url":"https://github.com/kennknowles","followers_url":"https://api.github.com/users/kennknowles/followers","following_url":"https://api.github.com/users/kennknowles/following{/other_user}","gists_url":"https://api.github.com/users/kennknowles/gists{/gist_id}","starred_url":"https://api.github.com/users/kennknowles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kennknowles/subscriptions","organizations_url":"https://api.github.com/users/kennknowles/orgs","repos_url":"https://api.github.com/users/kennknowles/repos","events_url":"https://api.github.com/users/kennknowles/events{/privacy}","received_events_url":"https://api.github.com/users/kennknowles/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kennknowles/incubator-beam","description":"Mirror of Apache Beam (Incubating)","fork":true,"url":"https://api.github.com/repos/kennknowles/incubator-beam","forks_url":"https://api.github.com/repos/kennknowles/incubator-beam/forks","keys_url":"https://api.github.com/repos/kennknowles/incubator-beam/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kennknowles/incubator-beam/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kennknowles/incubator-beam/teams","hooks_url":"https://api.github.com/repos/kennknowles/incubator-beam/hooks","issue_events_url":"https://api.github.com/repos/kennknowles/incubator-beam/issues/events{/number}","events_url":"https://api.github.com/repos/kennknowles/incubator-beam/events","assignees_url":"https://api.github.com/repos/kennknowles/incubator-beam/assignees{/user}","branches_url":"https://api.github.com/repos/kennknowles/incubator-beam/branches{/branch}","tags_url":"https://api.github.com/repos/kennknowles/incubator-beam/tags","blobs_url":"https://api.github.com/repos/kennknowles/incubator-beam/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kennknowles/incubator-beam/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kennknowles/incubator-beam/git/refs{/sha}","trees_url":"https://api.github.com/repos/kennknowles/incubator-beam/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kennknowles/incubator-beam/statuses/{sha}","languages_url":"https://api.github.com/repos/kennknowles/incubator-beam/languages","stargazers_url":"https://api.github.com/repos/kennknowles/incubator-beam/stargazers","contributors_url":"https://api.github.com/repos/kennknowles/incubator-beam/contributors","subscribers_url":"https://api.github.com/repos/kennknowles/incubator-beam/subscribers","subscription_url":"https://api.github.com/repos/kennknowles/incubator-beam/subscription","commits_url":"https://api.github.com/repos/kennknowles/incubator-beam/commits{/sha}","git_commits_url":"https://api.github.com/repos/kennknowles/incubator-beam/git/commits{/sha}","comments_url":"https://api.github.com/repos/kennknowles/incubator-beam/comments{/number}","issue_comment_url":"https://api.github.com/repos/kennknowles/incubator-beam/issues/comments{/number}","contents_url":"https://api.github.com/repos/kennknowles/incubator-beam/contents/{+path}","compare_url":"https://api.github.com/repos/kennknowles/incubator-beam/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kennknowles/incubator-beam/merges","archive_url":"https://api.github.com/repos/kennknowles/incubator-beam/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kennknowles/incubator-beam/downloads","issues_url":"https://api.github.com/repos/kennknowles/incubator-beam/issues{/number}","pulls_url":"https://api.github.com/repos/kennknowles/incubator-beam/pulls{/number}","milestones_url":"https://api.github.com/repos/kennknowles/incubator-beam/milestones{/number}","notifications_url":"https://api.github.com/repos/kennknowles/incubator-beam/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kennknowles/incubator-beam/labels{/name}","releases_url":"https://api.github.com/repos/kennknowles/incubator-beam/releases{/id}","deployments_url":"https://api.github.com/repos/kennknowles/incubator-beam/deployments","created_at":"2016-02-27T02:37:09Z","updated_at":"2016-02-27T02:37:12Z","pushed_at":"2016-10-15T02:41:04Z","git_url":"git://github.com/kennknowles/incubator-beam.git","ssh_url":"git@github.com:kennknowles/incubator-beam.git","clone_url":"https://github.com/kennknowles/incubator-beam.git","svn_url":"https://github.com/kennknowles/incubator-beam","homepage":null,"size":20157,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"a0f649eaca8d8bd47d22db0ba7150fea1bf07975","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":50904245,"name":"incubator-beam","full_name":"apache/incubator-beam","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/incubator-beam","description":"Mirror of Apache Beam (Incubating)","fork":false,"url":"https://api.github.com/repos/apache/incubator-beam","forks_url":"https://api.github.com/repos/apache/incubator-beam/forks","keys_url":"https://api.github.com/repos/apache/incubator-beam/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/incubator-beam/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/incubator-beam/teams","hooks_url":"https://api.github.com/repos/apache/incubator-beam/hooks","issue_events_url":"https://api.github.com/repos/apache/incubator-beam/issues/events{/number}","events_url":"https://api.github.com/repos/apache/incubator-beam/events","assignees_url":"https://api.github.com/repos/apache/incubator-beam/assignees{/user}","branches_url":"https://api.github.com/repos/apache/incubator-beam/branches{/branch}","tags_url":"https://api.github.com/repos/apache/incubator-beam/tags","blobs_url":"https://api.github.com/repos/apache/incubator-beam/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/incubator-beam/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/incubator-beam/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/incubator-beam/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/incubator-beam/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/incubator-beam/languages","stargazers_url":"https://api.github.com/repos/apache/incubator-beam/stargazers","contributors_url":"https://api.github.com/repos/apache/incubator-beam/contributors","subscribers_url":"https://api.github.com/repos/apache/incubator-beam/subscribers","subscription_url":"https://api.github.com/repos/apache/incubator-beam/subscription","commits_url":"https://api.github.com/repos/apache/incubator-beam/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/incubator-beam/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/incubator-beam/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/incubator-beam/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/incubator-beam/contents/{+path}","compare_url":"https://api.github.com/repos/apache/incubator-beam/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/incubator-beam/merges","archive_url":"https://api.github.com/repos/apache/incubator-beam/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/incubator-beam/downloads","issues_url":"https://api.github.com/repos/apache/incubator-beam/issues{/number}","pulls_url":"https://api.github.com/repos/apache/incubator-beam/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/incubator-beam/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/incubator-beam/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/incubator-beam/labels{/name}","releases_url":"https://api.github.com/repos/apache/incubator-beam/releases{/id}","deployments_url":"https://api.github.com/repos/apache/incubator-beam/deployments","created_at":"2016-02-02T08:00:06Z","updated_at":"2016-10-14T15:29:14Z","pushed_at":"2016-10-15T02:41:04Z","git_url":"git://github.com/apache/incubator-beam.git","ssh_url":"git@github.com:apache/incubator-beam.git","clone_url":"https://github.com/apache/incubator-beam.git","svn_url":"https://github.com/apache/incubator-beam","homepage":null,"size":32046,"stargazers_count":385,"watchers_count":385,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":246,"mirror_url":"git://git.apache.org/incubator-beam.git","open_issues_count":54,"forks":246,"open_issues":54,"watchers":385,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-beam/pulls/1102"},"html":{"href":"https://github.com/apache/incubator-beam/pull/1102"},"issue":{"href":"https://api.github.com/repos/apache/incubator-beam/issues/1102"},"comments":{"href":"https://api.github.com/repos/apache/incubator-beam/issues/1102/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/incubator-beam/pulls/1102/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/incubator-beam/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/incubator-beam/pulls/1102/commits"},"statuses":{"href":"https://api.github.com/repos/apache/incubator-beam/statuses/d80d0fbc01412b6e353126f4c7784dcf054fba76"}}}}
{"actor":{"display_login":"kennknowles"}}