{"action":"created","comment":{"url":"https://api.github.com/repos/eclipse/microprofile-concurrency/pulls/comments/219497648","pull_request_review_id":157690966,"id":219497648,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxOTQ5NzY0OA==","diff_hunk":"@@ -0,0 +1,115 @@\n+/*\n+ * Copyright (c) 2018 Contributors to the Eclipse Foundation\n+ *\n+ * See the NOTICE file(s) distributed with this work for additional\n+ * information regarding copyright ownership.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * You may not use this file except in compliance with the License.\n+ * 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.eclipse.microprofile.concurrent;\n+\n+import org.eclipse.microprofile.concurrent.spi.ConcurrencyProvider;\n+\n+/**\n+ * <p>Builder for <code>ManagedExecutor</code> instances.</p>\n+ *\n+ * <p>Example usage:</p>\n+ * <pre><code> ManagedExecutor executor = ManagedExecutorBuilder.instance()\n+ *                                                  .maxAsync(5)\n+ *                                                  .maxQueued(20)\n+ *                                                  .propagated(ThreadContext.SECURITY)\n+ *                                                  .build();\n+ * ...\n+ * </code></pre>\n+ */\n+public interface ManagedExecutorBuilder {\n+    /**\n+     * <p>Builds a new <code>ManagedExecutor</code> with the configuration\n+     * that this builder represents as of the point in time when this method\n+     * is invoked.</p>\n+     *\n+     * <p>After <code>build</code> is invoked, the builder instance retains its\n+     * configuration and may be further updated to represent different\n+     * configurations and build additional <code>ManagedExecutor</code>\n+     * instances.</p>\n+     *\n+     * @return new instance of <code>ManagedExecutor</code>.\n+     */\n+    ManagedExecutor build();\n+\n+    /**\n+     * <p>Defines the set of thread context types to capture from the thread\n+     * that creates a dependent stage (or that submits a task) and which to\n+     * propagate to the thread where the action or task executes.</p>\n+     *\n+     * <p>This set replaces the set that was previously specified on the\n+     * builder instance.</p>\n+     *\n+     * <p>The default set of thread context types is those required by the\n+     * EE Concurrency spec, plus CDI.</p>\n+     *\n+     * <p>Constants for specifying some of the core context types are provided\n+     * on {@link ThreadContext}. Other thread context types must be defined\n+     * by the specification that defines the context type or by a related\n+     * MicroProfile specification.</p>\n+     *\n+     * <p>Inclusion of a thread context type with prerequisites implies\n+     * inclusion of the prerequisites, even if not explicitly specified.</p>\n+     *\n+     * <p>Thread context types which are not otherwise included in this set\n+     * are cleared from the thread of execution for the duration of the\n+     * action or task.</p>\n+     *\n+     * @param types types of thread context to capture and propagate.\n+     * @return the same builder instance upon which this method is invoked.\n+     */\n+    ManagedExecutorBuilder propagated(String... types);","path":"api/src/main/java/org/eclipse/microprofile/concurrent/ManagedExecutorBuilder.java","position":76,"original_position":76,"commit_id":"08e0f07dda2b41024596e864fb94c612901b5b8e","original_commit_id":"08e0f07dda2b41024596e864fb94c612901b5b8e","user":{"login":"Emily-Jiang","id":10999780,"node_id":"MDQ6VXNlcjEwOTk5Nzgw","avatar_url":"https://avatars2.githubusercontent.com/u/10999780?v=4","gravatar_id":"","url":"https://api.github.com/users/Emily-Jiang","html_url":"https://github.com/Emily-Jiang","followers_url":"https://api.github.com/users/Emily-Jiang/followers","following_url":"https://api.github.com/users/Emily-Jiang/following{/other_user}","gists_url":"https://api.github.com/users/Emily-Jiang/gists{/gist_id}","starred_url":"https://api.github.com/users/Emily-Jiang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Emily-Jiang/subscriptions","organizations_url":"https://api.github.com/users/Emily-Jiang/orgs","repos_url":"https://api.github.com/users/Emily-Jiang/repos","events_url":"https://api.github.com/users/Emily-Jiang/events{/privacy}","received_events_url":"https://api.github.com/users/Emily-Jiang/received_events","type":"User","site_admin":false},"body":"This is type safe though. Is it possible to pass in ThreadContext type instead and then in ThreadContext to create instances for the contexts","created_at":"2018-09-21T13:31:37Z","updated_at":"2018-09-21T13:31:43Z","html_url":"https://github.com/eclipse/microprofile-concurrency/pull/8#discussion_r219497648","pull_request_url":"https://api.github.com/repos/eclipse/microprofile-concurrency/pulls/8","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/eclipse/microprofile-concurrency/pulls/comments/219497648"},"html":{"href":"https://github.com/eclipse/microprofile-concurrency/pull/8#discussion_r219497648"},"pull_request":{"href":"https://api.github.com/repos/eclipse/microprofile-concurrency/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/eclipse/microprofile-concurrency/pulls/8","id":213680472,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEzNjgwNDcy","html_url":"https://github.com/eclipse/microprofile-concurrency/pull/8","diff_url":"https://github.com/eclipse/microprofile-concurrency/pull/8.diff","patch_url":"https://github.com/eclipse/microprofile-concurrency/pull/8.patch","issue_url":"https://api.github.com/repos/eclipse/microprofile-concurrency/issues/8","number":8,"state":"open","locked":false,"title":"possible builder pattern to address issue #6","user":{"login":"njr-11","id":13710803,"node_id":"MDQ6VXNlcjEzNzEwODAz","avatar_url":"https://avatars3.githubusercontent.com/u/13710803?v=4","gravatar_id":"","url":"https://api.github.com/users/njr-11","html_url":"https://github.com/njr-11","followers_url":"https://api.github.com/users/njr-11/followers","following_url":"https://api.github.com/users/njr-11/following{/other_user}","gists_url":"https://api.github.com/users/njr-11/gists{/gist_id}","starred_url":"https://api.github.com/users/njr-11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/njr-11/subscriptions","organizations_url":"https://api.github.com/users/njr-11/orgs","repos_url":"https://api.github.com/users/njr-11/repos","events_url":"https://api.github.com/users/njr-11/events{/privacy}","received_events_url":"https://api.github.com/users/njr-11/received_events","type":"User","site_admin":false},"body":"In this pull, which fixes #6, I have copied the ManagedExecutorConfig/ThreadContextConfig annotations used for CDI into ManagedExecutorBuilder/ThreadContextBuilder interfaces that can be used independently of CDI.  Will need to go over with the spec group if this is an approach we want to pursue.","created_at":"2018-09-06T16:37:26Z","updated_at":"2018-09-21T13:31:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ee308d7dba005834eb89d7eef35882bfe5564ea7","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/eclipse/microprofile-concurrency/pulls/8/commits","review_comments_url":"https://api.github.com/repos/eclipse/microprofile-concurrency/pulls/8/comments","review_comment_url":"https://api.github.com/repos/eclipse/microprofile-concurrency/pulls/comments{/number}","comments_url":"https://api.github.com/repos/eclipse/microprofile-concurrency/issues/8/comments","statuses_url":"https://api.github.com/repos/eclipse/microprofile-concurrency/statuses/08e0f07dda2b41024596e864fb94c612901b5b8e","head":{"label":"njr-11:6-builder-pattern","ref":"6-builder-pattern","sha":"08e0f07dda2b41024596e864fb94c612901b5b8e","user":{"login":"njr-11","id":13710803,"node_id":"MDQ6VXNlcjEzNzEwODAz","avatar_url":"https://avatars3.githubusercontent.com/u/13710803?v=4","gravatar_id":"","url":"https://api.github.com/users/njr-11","html_url":"https://github.com/njr-11","followers_url":"https://api.github.com/users/njr-11/followers","following_url":"https://api.github.com/users/njr-11/following{/other_user}","gists_url":"https://api.github.com/users/njr-11/gists{/gist_id}","starred_url":"https://api.github.com/users/njr-11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/njr-11/subscriptions","organizations_url":"https://api.github.com/users/njr-11/orgs","repos_url":"https://api.github.com/users/njr-11/repos","events_url":"https://api.github.com/users/njr-11/events{/privacy}","received_events_url":"https://api.github.com/users/njr-11/received_events","type":"User","site_admin":false},"repo":{"id":145744223,"node_id":"MDEwOlJlcG9zaXRvcnkxNDU3NDQyMjM=","name":"microprofile-concurrency","full_name":"njr-11/microprofile-concurrency","private":false,"owner":{"login":"njr-11","id":13710803,"node_id":"MDQ6VXNlcjEzNzEwODAz","avatar_url":"https://avatars3.githubusercontent.com/u/13710803?v=4","gravatar_id":"","url":"https://api.github.com/users/njr-11","html_url":"https://github.com/njr-11","followers_url":"https://api.github.com/users/njr-11/followers","following_url":"https://api.github.com/users/njr-11/following{/other_user}","gists_url":"https://api.github.com/users/njr-11/gists{/gist_id}","starred_url":"https://api.github.com/users/njr-11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/njr-11/subscriptions","organizations_url":"https://api.github.com/users/njr-11/orgs","repos_url":"https://api.github.com/users/njr-11/repos","events_url":"https://api.github.com/users/njr-11/events{/privacy}","received_events_url":"https://api.github.com/users/njr-11/received_events","type":"User","site_admin":false},"html_url":"https://github.com/njr-11/microprofile-concurrency","description":null,"fork":true,"url":"https://api.github.com/repos/njr-11/microprofile-concurrency","forks_url":"https://api.github.com/repos/njr-11/microprofile-concurrency/forks","keys_url":"https://api.github.com/repos/njr-11/microprofile-concurrency/keys{/key_id}","collaborators_url":"https://api.github.com/repos/njr-11/microprofile-concurrency/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/njr-11/microprofile-concurrency/teams","hooks_url":"https://api.github.com/repos/njr-11/microprofile-concurrency/hooks","issue_events_url":"https://api.github.com/repos/njr-11/microprofile-concurrency/issues/events{/number}","events_url":"https://api.github.com/repos/njr-11/microprofile-concurrency/events","assignees_url":"https://api.github.com/repos/njr-11/microprofile-concurrency/assignees{/user}","branches_url":"https://api.github.com/repos/njr-11/microprofile-concurrency/branches{/branch}","tags_url":"https://api.github.com/repos/njr-11/microprofile-concurrency/tags","blobs_url":"https://api.github.com/repos/njr-11/microprofile-concurrency/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/njr-11/microprofile-concurrency/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/njr-11/microprofile-concurrency/git/refs{/sha}","trees_url":"https://api.github.com/repos/njr-11/microprofile-concurrency/git/trees{/sha}","statuses_url":"https://api.github.com/repos/njr-11/microprofile-concurrency/statuses/{sha}","languages_url":"https://api.github.com/repos/njr-11/microprofile-concurrency/languages","stargazers_url":"https://api.github.com/repos/njr-11/microprofile-concurrency/stargazers","contributors_url":"https://api.github.com/repos/njr-11/microprofile-concurrency/contributors","subscribers_url":"https://api.github.com/repos/njr-11/microprofile-concurrency/subscribers","subscription_url":"https://api.github.com/repos/njr-11/microprofile-concurrency/subscription","commits_url":"https://api.github.com/repos/njr-11/microprofile-concurrency/commits{/sha}","git_commits_url":"https://api.github.com/repos/njr-11/microprofile-concurrency/git/commits{/sha}","comments_url":"https://api.github.com/repos/njr-11/microprofile-concurrency/comments{/number}","issue_comment_url":"https://api.github.com/repos/njr-11/microprofile-concurrency/issues/comments{/number}","contents_url":"https://api.github.com/repos/njr-11/microprofile-concurrency/contents/{+path}","compare_url":"https://api.github.com/repos/njr-11/microprofile-concurrency/compare/{base}...{head}","merges_url":"https://api.github.com/repos/njr-11/microprofile-concurrency/merges","archive_url":"https://api.github.com/repos/njr-11/microprofile-concurrency/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/njr-11/microprofile-concurrency/downloads","issues_url":"https://api.github.com/repos/njr-11/microprofile-concurrency/issues{/number}","pulls_url":"https://api.github.com/repos/njr-11/microprofile-concurrency/pulls{/number}","milestones_url":"https://api.github.com/repos/njr-11/microprofile-concurrency/milestones{/number}","notifications_url":"https://api.github.com/repos/njr-11/microprofile-concurrency/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/njr-11/microprofile-concurrency/labels{/name}","releases_url":"https://api.github.com/repos/njr-11/microprofile-concurrency/releases{/id}","deployments_url":"https://api.github.com/repos/njr-11/microprofile-concurrency/deployments","created_at":"2018-08-22T17:57:17Z","updated_at":"2018-09-18T16:00:31Z","pushed_at":"2018-09-20T18:24:08Z","git_url":"git://github.com/njr-11/microprofile-concurrency.git","ssh_url":"git@github.com:njr-11/microprofile-concurrency.git","clone_url":"https://github.com/njr-11/microprofile-concurrency.git","svn_url":"https://github.com/njr-11/microprofile-concurrency","homepage":null,"size":50,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"eclipse:master","ref":"master","sha":"a3d6f88d1579d25f7f9a5a6c567fef9126da436f","user":{"login":"eclipse","id":56974,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU2OTc0","avatar_url":"https://avatars1.githubusercontent.com/u/56974?v=4","gravatar_id":"","url":"https://api.github.com/users/eclipse","html_url":"https://github.com/eclipse","followers_url":"https://api.github.com/users/eclipse/followers","following_url":"https://api.github.com/users/eclipse/following{/other_user}","gists_url":"https://api.github.com/users/eclipse/gists{/gist_id}","starred_url":"https://api.github.com/users/eclipse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eclipse/subscriptions","organizations_url":"https://api.github.com/users/eclipse/orgs","repos_url":"https://api.github.com/users/eclipse/repos","events_url":"https://api.github.com/users/eclipse/events{/privacy}","received_events_url":"https://api.github.com/users/eclipse/received_events","type":"Organization","site_admin":false},"repo":{"id":144856971,"node_id":"MDEwOlJlcG9zaXRvcnkxNDQ4NTY5NzE=","name":"microprofile-concurrency","full_name":"eclipse/microprofile-concurrency","private":false,"owner":{"login":"eclipse","id":56974,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU2OTc0","avatar_url":"https://avatars1.githubusercontent.com/u/56974?v=4","gravatar_id":"","url":"https://api.github.com/users/eclipse","html_url":"https://github.com/eclipse","followers_url":"https://api.github.com/users/eclipse/followers","following_url":"https://api.github.com/users/eclipse/following{/other_user}","gists_url":"https://api.github.com/users/eclipse/gists{/gist_id}","starred_url":"https://api.github.com/users/eclipse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eclipse/subscriptions","organizations_url":"https://api.github.com/users/eclipse/orgs","repos_url":"https://api.github.com/users/eclipse/repos","events_url":"https://api.github.com/users/eclipse/events{/privacy}","received_events_url":"https://api.github.com/users/eclipse/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/eclipse/microprofile-concurrency","description":null,"fork":false,"url":"https://api.github.com/repos/eclipse/microprofile-concurrency","forks_url":"https://api.github.com/repos/eclipse/microprofile-concurrency/forks","keys_url":"https://api.github.com/repos/eclipse/microprofile-concurrency/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eclipse/microprofile-concurrency/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eclipse/microprofile-concurrency/teams","hooks_url":"https://api.github.com/repos/eclipse/microprofile-concurrency/hooks","issue_events_url":"https://api.github.com/repos/eclipse/microprofile-concurrency/issues/events{/number}","events_url":"https://api.github.com/repos/eclipse/microprofile-concurrency/events","assignees_url":"https://api.github.com/repos/eclipse/microprofile-concurrency/assignees{/user}","branches_url":"https://api.github.com/repos/eclipse/microprofile-concurrency/branches{/branch}","tags_url":"https://api.github.com/repos/eclipse/microprofile-concurrency/tags","blobs_url":"https://api.github.com/repos/eclipse/microprofile-concurrency/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eclipse/microprofile-concurrency/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eclipse/microprofile-concurrency/git/refs{/sha}","trees_url":"https://api.github.com/repos/eclipse/microprofile-concurrency/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eclipse/microprofile-concurrency/statuses/{sha}","languages_url":"https://api.github.com/repos/eclipse/microprofile-concurrency/languages","stargazers_url":"https://api.github.com/repos/eclipse/microprofile-concurrency/stargazers","contributors_url":"https://api.github.com/repos/eclipse/microprofile-concurrency/contributors","subscribers_url":"https://api.github.com/repos/eclipse/microprofile-concurrency/subscribers","subscription_url":"https://api.github.com/repos/eclipse/microprofile-concurrency/subscription","commits_url":"https://api.github.com/repos/eclipse/microprofile-concurrency/commits{/sha}","git_commits_url":"https://api.github.com/repos/eclipse/microprofile-concurrency/git/commits{/sha}","comments_url":"https://api.github.com/repos/eclipse/microprofile-concurrency/comments{/number}","issue_comment_url":"https://api.github.com/repos/eclipse/microprofile-concurrency/issues/comments{/number}","contents_url":"https://api.github.com/repos/eclipse/microprofile-concurrency/contents/{+path}","compare_url":"https://api.github.com/repos/eclipse/microprofile-concurrency/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eclipse/microprofile-concurrency/merges","archive_url":"https://api.github.com/repos/eclipse/microprofile-concurrency/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eclipse/microprofile-concurrency/downloads","issues_url":"https://api.github.com/repos/eclipse/microprofile-concurrency/issues{/number}","pulls_url":"https://api.github.com/repos/eclipse/microprofile-concurrency/pulls{/number}","milestones_url":"https://api.github.com/repos/eclipse/microprofile-concurrency/milestones{/number}","notifications_url":"https://api.github.com/repos/eclipse/microprofile-concurrency/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eclipse/microprofile-concurrency/labels{/name}","releases_url":"https://api.github.com/repos/eclipse/microprofile-concurrency/releases{/id}","deployments_url":"https://api.github.com/repos/eclipse/microprofile-concurrency/deployments","created_at":"2018-08-15T13:31:05Z","updated_at":"2018-09-18T21:15:38Z","pushed_at":"2018-09-20T18:28:03Z","git_url":"git://github.com/eclipse/microprofile-concurrency.git","ssh_url":"git@github.com:eclipse/microprofile-concurrency.git","clone_url":"https://github.com/eclipse/microprofile-concurrency.git","svn_url":"https://github.com/eclipse/microprofile-concurrency","homepage":null,"size":38,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":10,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":2,"open_issues":10,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/eclipse/microprofile-concurrency/pulls/8"},"html":{"href":"https://github.com/eclipse/microprofile-concurrency/pull/8"},"issue":{"href":"https://api.github.com/repos/eclipse/microprofile-concurrency/issues/8"},"comments":{"href":"https://api.github.com/repos/eclipse/microprofile-concurrency/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/eclipse/microprofile-concurrency/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/eclipse/microprofile-concurrency/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/eclipse/microprofile-concurrency/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/eclipse/microprofile-concurrency/statuses/08e0f07dda2b41024596e864fb94c612901b5b8e"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"Emily-Jiang"}}