GitHub PullRequestReviewCommentEvent at 2014-08-29 07:06:44
Repository: netty
Actor: normanmaurer
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/netty/netty/pulls/comments/16884445","id":16884445,"diff_hunk":"@@ -0,0 +1,45 @@\n+/*\n+ * Copyright 2014 The Netty Project\n+ *\n+ * The Netty Project licenses this file to you under the Apache License,\n+ * version 2.0 (the \"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, WITHOUT\n+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n+ * License for the specific language governing permissions and limitations\n+ * under the License.\n+ */\n+\n+package io.netty.util.concurrent;\n+\n+import io.netty.util.metrics.EventExecutorMetrics;\n+import io.netty.util.metrics.EventExecutorMetricsFactory;\n+\n+import java.util.Set;\n+\n+/**\n+ * Derive from this interface to create your own {@link EventExecutorScheduler} implementation.\n+ */\n+public interface EventExecutorScheduler<T1 extends EventExecutor, T2 extends EventExecutorMetrics>\n+        extends EventExecutorMetricsFactory<T2> {\n+\n+    /**\n+     * Returns one of the {@linkplain EventExecutor}s managed by this {@link EventExecutorScheduler}.\n+     * This method must be implemented thread-safe. This method must not return {@code null}.\n+     */\n+    T1 next();\n+\n+    /**\n+     * Add an {@link EventExecutor} and its corresponding {@link EventExecutorMetrics} object.\n+     */\n+    void addChild(T1 executor, T2 metrics);\n+\n+    /**\n+     * Returns an unmodifiable set of all {@linkplain EventExecutor}s managed by this {@link EventExecutorScheduler}.\n+     */\n+    Set<T1> children();","path":"common/src/main/java/io/netty/util/concurrent/EventExecutorScheduler.java","position":44,"original_position":44,"commit_id":"0299cac0737b0566a9be2b842299f72c0d025d24","original_commit_id":"0299cac0737b0566a9be2b842299f72c0d025d24","user":{"login":"normanmaurer","id":439362,"avatar_url":"https://avatars.githubusercontent.com/u/439362?v=2","gravatar_id":"e521627c18ed3feaf9db41e754a79483","url":"https://api.github.com/users/normanmaurer","html_url":"https://github.com/normanmaurer","followers_url":"https://api.github.com/users/normanmaurer/followers","following_url":"https://api.github.com/users/normanmaurer/following{/other_user}","gists_url":"https://api.github.com/users/normanmaurer/gists{/gist_id}","starred_url":"https://api.github.com/users/normanmaurer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/normanmaurer/subscriptions","organizations_url":"https://api.github.com/users/normanmaurer/orgs","repos_url":"https://api.github.com/users/normanmaurer/repos","events_url":"https://api.github.com/users/normanmaurer/events{/privacy}","received_events_url":"https://api.github.com/users/normanmaurer/received_events","type":"User","site_admin":false},"body":"Add some comment that the returned Set will not contain any new executors that were added via `addChild(...)` after it was retrieved.","created_at":"2014-08-29T07:06:44Z","updated_at":"2014-08-29T07:06:44Z","html_url":"https://github.com/netty/netty/pull/2788#discussion_r16884445","pull_request_url":"https://api.github.com/repos/netty/netty/pulls/2788","_links":{"self":{"href":"https://api.github.com/repos/netty/netty/pulls/comments/16884445"},"html":{"href":"https://github.com/netty/netty/pull/2788#discussion_r16884445"},"pull_request":{"href":"https://api.github.com/repos/netty/netty/pulls/2788"}}},"pull_request":{"url":"https://api.github.com/repos/netty/netty/pulls/2788","id":19927292,"html_url":"https://github.com/netty/netty/pull/2788","diff_url":"https://github.com/netty/netty/pull/2788.diff","patch_url":"https://github.com/netty/netty/pull/2788.patch","issue_url":"https://api.github.com/repos/netty/netty/issues/2788","number":2788,"state":"open","locked":false,"title":"Pluggable algorithm to choose next EventLoop","user":{"login":"jakobbuchgraber","id":1388179,"avatar_url":"https://avatars.githubusercontent.com/u/1388179?v=2","gravatar_id":"00e5d9f180c85792980f936a90b4fde7","url":"https://api.github.com/users/jakobbuchgraber","html_url":"https://github.com/jakobbuchgraber","followers_url":"https://api.github.com/users/jakobbuchgraber/followers","following_url":"https://api.github.com/users/jakobbuchgraber/following{/other_user}","gists_url":"https://api.github.com/users/jakobbuchgraber/gists{/gist_id}","starred_url":"https://api.github.com/users/jakobbuchgraber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakobbuchgraber/subscriptions","organizations_url":"https://api.github.com/users/jakobbuchgraber/orgs","repos_url":"https://api.github.com/users/jakobbuchgraber/repos","events_url":"https://api.github.com/users/jakobbuchgraber/events{/privacy}","received_events_url":"https://api.github.com/users/jakobbuchgraber/received_events","type":"User","site_admin":false},"body":"Hello,\r\n\r\nthis PR introduces a way for developers to plug their own `Next-EventLoop Algorithm` into `NioEventLoopGroup` and `EpollEventLoopGroup`. Additionally an API to gather metrics from the `EventLoop`s is introduced.\r\n\r\nThis PR is still missing most of the tests. I haven't been able to execute on my GENIUS vision of a unified test class for all `Channel` / `EventLoop` implementations that use a `MetricsCollector` YET. So I didn't include this code here (it's coming and something to look forward to though :smile: ). Despite that, I think the code is ready to get some feedback from @normanmaurer and @trustin.\r\n\r\nSome issues I would love to get you guys input on:\r\n* I am not a fan of the name `MetricsCollector.(start|stop)processIo()`. Would be thankful for naming suggestions.\r\n* I think `EventLoopChooser` sounds odd. How about `EventLoopScheduler`? That sounds more powerful.\r\n* I think it would make sense to extend the `(Nio|Epoll)EventLoopGroup` constructors to additionally accept a standalone `MetricsCollectorFactory` object (and also have `EventLoopChooser` implement this interface). That way a user could only gather metrics and continue to use the default `EventLoopChooser`.\r\n* Since @normanmaurer and I decided to gather metrics by integrating the metric hooks directly into the code, instead of using a separate `ChannelHandler` we have more freedom in which metrics to collect. Anything missing in the current implementation that would be useful?\r\n\r\nThanks,\r\nJakob","created_at":"2014-08-18T16:05:23Z","updated_at":"2014-08-29T07:06:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8c294eca523fb26a891d3a2af6eb6026de26b029","assignee":null,"milestone":{"url":"https://api.github.com/repos/netty/netty/milestones/80","labels_url":"https://api.github.com/repos/netty/netty/milestones/80/labels","id":504488,"number":80,"title":"5.0.0.Alpha2","description":"","creator":{"login":"normanmaurer","id":439362,"avatar_url":"https://avatars.githubusercontent.com/u/439362?v=2","gravatar_id":"e521627c18ed3feaf9db41e754a79483","url":"https://api.github.com/users/normanmaurer","html_url":"https://github.com/normanmaurer","followers_url":"https://api.github.com/users/normanmaurer/followers","following_url":"https://api.github.com/users/normanmaurer/following{/other_user}","gists_url":"https://api.github.com/users/normanmaurer/gists{/gist_id}","starred_url":"https://api.github.com/users/normanmaurer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/normanmaurer/subscriptions","organizations_url":"https://api.github.com/users/normanmaurer/orgs","repos_url":"https://api.github.com/users/normanmaurer/repos","events_url":"https://api.github.com/users/normanmaurer/events{/privacy}","received_events_url":"https://api.github.com/users/normanmaurer/received_events","type":"User","site_admin":false},"open_issues":51,"closed_issues":57,"state":"open","created_at":"2013-12-04T06:57:47Z","updated_at":"2014-08-27T04:35:57Z","due_on":null},"commits_url":"https://api.github.com/repos/netty/netty/pulls/2788/commits","review_comments_url":"https://api.github.com/repos/netty/netty/pulls/2788/comments","review_comment_url":"https://api.github.com/repos/netty/netty/pulls/comments/{number}","comments_url":"https://api.github.com/repos/netty/netty/issues/2788/comments","statuses_url":"https://api.github.com/repos/netty/netty/statuses/0299cac0737b0566a9be2b842299f72c0d025d24","head":{"label":"jakobbuchgraber:eventloopchooser","ref":"eventloopchooser","sha":"0299cac0737b0566a9be2b842299f72c0d025d24","user":{"login":"jakobbuchgraber","id":1388179,"avatar_url":"https://avatars.githubusercontent.com/u/1388179?v=2","gravatar_id":"00e5d9f180c85792980f936a90b4fde7","url":"https://api.github.com/users/jakobbuchgraber","html_url":"https://github.com/jakobbuchgraber","followers_url":"https://api.github.com/users/jakobbuchgraber/followers","following_url":"https://api.github.com/users/jakobbuchgraber/following{/other_user}","gists_url":"https://api.github.com/users/jakobbuchgraber/gists{/gist_id}","starred_url":"https://api.github.com/users/jakobbuchgraber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakobbuchgraber/subscriptions","organizations_url":"https://api.github.com/users/jakobbuchgraber/orgs","repos_url":"https://api.github.com/users/jakobbuchgraber/repos","events_url":"https://api.github.com/users/jakobbuchgraber/events{/privacy}","received_events_url":"https://api.github.com/users/jakobbuchgraber/received_events","type":"User","site_admin":false},"repo":{"id":17233219,"name":"netty","full_name":"jakobbuchgraber/netty","owner":{"login":"jakobbuchgraber","id":1388179,"avatar_url":"https://avatars.githubusercontent.com/u/1388179?v=2","gravatar_id":"00e5d9f180c85792980f936a90b4fde7","url":"https://api.github.com/users/jakobbuchgraber","html_url":"https://github.com/jakobbuchgraber","followers_url":"https://api.github.com/users/jakobbuchgraber/followers","following_url":"https://api.github.com/users/jakobbuchgraber/following{/other_user}","gists_url":"https://api.github.com/users/jakobbuchgraber/gists{/gist_id}","starred_url":"https://api.github.com/users/jakobbuchgraber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakobbuchgraber/subscriptions","organizations_url":"https://api.github.com/users/jakobbuchgraber/orgs","repos_url":"https://api.github.com/users/jakobbuchgraber/repos","events_url":"https://api.github.com/users/jakobbuchgraber/events{/privacy}","received_events_url":"https://api.github.com/users/jakobbuchgraber/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jakobbuchgraber/netty","description":"Netty project - an event-driven asynchronous network application framework","fork":true,"url":"https://api.github.com/repos/jakobbuchgraber/netty","forks_url":"https://api.github.com/repos/jakobbuchgraber/netty/forks","keys_url":"https://api.github.com/repos/jakobbuchgraber/netty/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jakobbuchgraber/netty/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jakobbuchgraber/netty/teams","hooks_url":"https://api.github.com/repos/jakobbuchgraber/netty/hooks","issue_events_url":"https://api.github.com/repos/jakobbuchgraber/netty/issues/events{/number}","events_url":"https://api.github.com/repos/jakobbuchgraber/netty/events","assignees_url":"https://api.github.com/repos/jakobbuchgraber/netty/assignees{/user}","branches_url":"https://api.github.com/repos/jakobbuchgraber/netty/branches{/branch}","tags_url":"https://api.github.com/repos/jakobbuchgraber/netty/tags","blobs_url":"https://api.github.com/repos/jakobbuchgraber/netty/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jakobbuchgraber/netty/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jakobbuchgraber/netty/git/refs{/sha}","trees_url":"https://api.github.com/repos/jakobbuchgraber/netty/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jakobbuchgraber/netty/statuses/{sha}","languages_url":"https://api.github.com/repos/jakobbuchgraber/netty/languages","stargazers_url":"https://api.github.com/repos/jakobbuchgraber/netty/stargazers","contributors_url":"https://api.github.com/repos/jakobbuchgraber/netty/contributors","subscribers_url":"https://api.github.com/repos/jakobbuchgraber/netty/subscribers","subscription_url":"https://api.github.com/repos/jakobbuchgraber/netty/subscription","commits_url":"https://api.github.com/repos/jakobbuchgraber/netty/commits{/sha}","git_commits_url":"https://api.github.com/repos/jakobbuchgraber/netty/git/commits{/sha}","comments_url":"https://api.github.com/repos/jakobbuchgraber/netty/comments{/number}","issue_comment_url":"https://api.github.com/repos/jakobbuchgraber/netty/issues/comments/{number}","contents_url":"https://api.github.com/repos/jakobbuchgraber/netty/contents/{+path}","compare_url":"https://api.github.com/repos/jakobbuchgraber/netty/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jakobbuchgraber/netty/merges","archive_url":"https://api.github.com/repos/jakobbuchgraber/netty/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jakobbuchgraber/netty/downloads","issues_url":"https://api.github.com/repos/jakobbuchgraber/netty/issues{/number}","pulls_url":"https://api.github.com/repos/jakobbuchgraber/netty/pulls{/number}","milestones_url":"https://api.github.com/repos/jakobbuchgraber/netty/milestones{/number}","notifications_url":"https://api.github.com/repos/jakobbuchgraber/netty/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jakobbuchgraber/netty/labels{/name}","releases_url":"https://api.github.com/repos/jakobbuchgraber/netty/releases{/id}","created_at":"2014-02-27T02:09:39Z","updated_at":"2014-06-25T18:36:14Z","pushed_at":"2014-08-28T19:28:47Z","git_url":"git://github.com/jakobbuchgraber/netty.git","ssh_url":"git@github.com:jakobbuchgraber/netty.git","clone_url":"https://github.com/jakobbuchgraber/netty.git","svn_url":"https://github.com/jakobbuchgraber/netty","homepage":"http://netty.io/","size":35142,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"netty:master","ref":"master","sha":"2128753484311a1854748d0274552e27007429a6","user":{"login":"netty","id":473791,"avatar_url":"https://avatars.githubusercontent.com/u/473791?v=2","gravatar_id":"6347d1c8085203b5bb67d3fe265917b5","url":"https://api.github.com/users/netty","html_url":"https://github.com/netty","followers_url":"https://api.github.com/users/netty/followers","following_url":"https://api.github.com/users/netty/following{/other_user}","gists_url":"https://api.github.com/users/netty/gists{/gist_id}","starred_url":"https://api.github.com/users/netty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/netty/subscriptions","organizations_url":"https://api.github.com/users/netty/orgs","repos_url":"https://api.github.com/users/netty/repos","events_url":"https://api.github.com/users/netty/events{/privacy}","received_events_url":"https://api.github.com/users/netty/received_events","type":"Organization","site_admin":false},"repo":{"id":1064563,"name":"netty","full_name":"netty/netty","owner":{"login":"netty","id":473791,"avatar_url":"https://avatars.githubusercontent.com/u/473791?v=2","gravatar_id":"6347d1c8085203b5bb67d3fe265917b5","url":"https://api.github.com/users/netty","html_url":"https://github.com/netty","followers_url":"https://api.github.com/users/netty/followers","following_url":"https://api.github.com/users/netty/following{/other_user}","gists_url":"https://api.github.com/users/netty/gists{/gist_id}","starred_url":"https://api.github.com/users/netty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/netty/subscriptions","organizations_url":"https://api.github.com/users/netty/orgs","repos_url":"https://api.github.com/users/netty/repos","events_url":"https://api.github.com/users/netty/events{/privacy}","received_events_url":"https://api.github.com/users/netty/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/netty/netty","description":"Netty project - an event-driven asynchronous network application framework","fork":false,"url":"https://api.github.com/repos/netty/netty","forks_url":"https://api.github.com/repos/netty/netty/forks","keys_url":"https://api.github.com/repos/netty/netty/keys{/key_id}","collaborators_url":"https://api.github.com/repos/netty/netty/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/netty/netty/teams","hooks_url":"https://api.github.com/repos/netty/netty/hooks","issue_events_url":"https://api.github.com/repos/netty/netty/issues/events{/number}","events_url":"https://api.github.com/repos/netty/netty/events","assignees_url":"https://api.github.com/repos/netty/netty/assignees{/user}","branches_url":"https://api.github.com/repos/netty/netty/branches{/branch}","tags_url":"https://api.github.com/repos/netty/netty/tags","blobs_url":"https://api.github.com/repos/netty/netty/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/netty/netty/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/netty/netty/git/refs{/sha}","trees_url":"https://api.github.com/repos/netty/netty/git/trees{/sha}","statuses_url":"https://api.github.com/repos/netty/netty/statuses/{sha}","languages_url":"https://api.github.com/repos/netty/netty/languages","stargazers_url":"https://api.github.com/repos/netty/netty/stargazers","contributors_url":"https://api.github.com/repos/netty/netty/contributors","subscribers_url":"https://api.github.com/repos/netty/netty/subscribers","subscription_url":"https://api.github.com/repos/netty/netty/subscription","commits_url":"https://api.github.com/repos/netty/netty/commits{/sha}","git_commits_url":"https://api.github.com/repos/netty/netty/git/commits{/sha}","comments_url":"https://api.github.com/repos/netty/netty/comments{/number}","issue_comment_url":"https://api.github.com/repos/netty/netty/issues/comments/{number}","contents_url":"https://api.github.com/repos/netty/netty/contents/{+path}","compare_url":"https://api.github.com/repos/netty/netty/compare/{base}...{head}","merges_url":"https://api.github.com/repos/netty/netty/merges","archive_url":"https://api.github.com/repos/netty/netty/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/netty/netty/downloads","issues_url":"https://api.github.com/repos/netty/netty/issues{/number}","pulls_url":"https://api.github.com/repos/netty/netty/pulls{/number}","milestones_url":"https://api.github.com/repos/netty/netty/milestones{/number}","notifications_url":"https://api.github.com/repos/netty/netty/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/netty/netty/labels{/name}","releases_url":"https://api.github.com/repos/netty/netty/releases{/id}","created_at":"2010-11-09T09:22:21Z","updated_at":"2014-08-29T03:08:40Z","pushed_at":"2014-08-29T05:48:17Z","git_url":"git://github.com/netty/netty.git","ssh_url":"git@github.com:netty/netty.git","clone_url":"https://github.com/netty/netty.git","svn_url":"https://github.com/netty/netty","homepage":"http://netty.io/","size":113556,"stargazers_count":3441,"watchers_count":3441,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":1600,"mirror_url":null,"open_issues_count":147,"forks":1600,"open_issues":147,"watchers":3441,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/netty/netty/pulls/2788"},"html":{"href":"https://github.com/netty/netty/pull/2788"},"issue":{"href":"https://api.github.com/repos/netty/netty/issues/2788"},"comments":{"href":"https://api.github.com/repos/netty/netty/issues/2788/comments"},"review_comments":{"href":"https://api.github.com/repos/netty/netty/pulls/2788/comments"},"review_comment":{"href":"https://api.github.com/repos/netty/netty/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/netty/netty/pulls/2788/commits"},"statuses":{"href":"https://api.github.com/repos/netty/netty/statuses/0299cac0737b0566a9be2b842299f72c0d025d24"}}}}