{"action":"created","comment":{"url":"https://api.github.com/repos/grpc/grpc-java/pulls/comments/53740455","id":53740455,"diff_hunk":"@@ -79,14 +80,14 @@\n public final class ManagedChannelImpl extends ManagedChannel {\n   private static final Logger log = Logger.getLogger(ManagedChannelImpl.class.getName());\n \n-  private static final ListenableFuture<ClientTransport> NULL_VALUE_TRANSPORT_FUTURE =\n-        Futures.immediateFuture(null);\n-\n   // Matching this pattern means the target string is a URI target or at least intended to be one.\n   // A URI target must be an absolute hierarchical URI.\n   // From RFC 2396: scheme = alpha *( alpha | digit | \"+\" | \"-\" | \".\" )\n   private static final Pattern URI_PATTERN = Pattern.compile(\"[a-zA-Z][a-zA-Z0-9+-.]*:/.*\");\n \n+  private static final ClientTransport shutdownTransport =","path":"core/src/main/java/io/grpc/internal/ManagedChannelImpl.java","position":38,"original_position":38,"commit_id":"482dfc4ffaf752bf75cc4349c53f50c1469be45a","original_commit_id":"482dfc4ffaf752bf75cc4349c53f50c1469be45a","user":{"login":"ejona86","id":2811396,"avatar_url":"https://avatars.githubusercontent.com/u/2811396?v=3","gravatar_id":"","url":"https://api.github.com/users/ejona86","html_url":"https://github.com/ejona86","followers_url":"https://api.github.com/users/ejona86/followers","following_url":"https://api.github.com/users/ejona86/following{/other_user}","gists_url":"https://api.github.com/users/ejona86/gists{/gist_id}","starred_url":"https://api.github.com/users/ejona86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ejona86/subscriptions","organizations_url":"https://api.github.com/users/ejona86/orgs","repos_url":"https://api.github.com/users/ejona86/repos","events_url":"https://api.github.com/users/ejona86/events{/privacy}","received_events_url":"https://api.github.com/users/ejona86/received_events","type":"User","site_admin":false},"body":"SHUTDOWN_TRANSPORT?","created_at":"2016-02-23T06:23:38Z","updated_at":"2016-02-23T06:23:38Z","html_url":"https://github.com/grpc/grpc-java/pull/1465#discussion_r53740455","pull_request_url":"https://api.github.com/repos/grpc/grpc-java/pulls/1465","_links":{"self":{"href":"https://api.github.com/repos/grpc/grpc-java/pulls/comments/53740455"},"html":{"href":"https://github.com/grpc/grpc-java/pull/1465#discussion_r53740455"},"pull_request":{"href":"https://api.github.com/repos/grpc/grpc-java/pulls/1465"}}},"pull_request":{"url":"https://api.github.com/repos/grpc/grpc-java/pulls/1465","id":60219074,"html_url":"https://github.com/grpc/grpc-java/pull/1465","diff_url":"https://github.com/grpc/grpc-java/pull/1465.diff","patch_url":"https://github.com/grpc/grpc-java/pull/1465.patch","issue_url":"https://api.github.com/repos/grpc/grpc-java/issues/1465","number":1465,"state":"open","locked":false,"title":"Pass transports instead of futures of transports for new calls","user":{"login":"zhangkun83","id":9053690,"avatar_url":"https://avatars.githubusercontent.com/u/9053690?v=3","gravatar_id":"","url":"https://api.github.com/users/zhangkun83","html_url":"https://github.com/zhangkun83","followers_url":"https://api.github.com/users/zhangkun83/followers","following_url":"https://api.github.com/users/zhangkun83/following{/other_user}","gists_url":"https://api.github.com/users/zhangkun83/gists{/gist_id}","starred_url":"https://api.github.com/users/zhangkun83/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhangkun83/subscriptions","organizations_url":"https://api.github.com/users/zhangkun83/orgs","repos_url":"https://api.github.com/users/zhangkun83/repos","events_url":"https://api.github.com/users/zhangkun83/events{/privacy}","received_events_url":"https://api.github.com/users/zhangkun83/received_events","type":"User","site_admin":false},"body":"This PR finishes the refactoring started by #1395. Resolves #1342.\r\n\r\nMajor changes:\r\n- All interfaces that return `ListenableFuture<T>` now return `T`\r\n- Stop passing `null` for transports after shut down. Pass `FailingClientTransport` instead. This simplifies the interface semantics of interfaces that return a transport, as well as their callers because they no longer need to check for `null`.\r\n- Add two methods to `TransportManager`:\r\n - `createInterimTransport()` takes the place of `BlankFutureProvider` in `LoadBalancer` implementations.\r\n - `createFailingTransport()` takes the place of errors in the `Future` when `LoadBalancer` implementations propagate errors to the caller.\r\n- `createInterimTransport()` creates a `DelayedClientTransport` tracked by `ManagedChannelImpl`, which will not terminate until all `DelayedClientTransport`s, in addition to the `TransportSet`s, are terminated.\r\n- Removed the transport argument from the ready and shutdown callbacks, because if `LoadBalancer` was given a delayed transport earlier, it will get the real transport's shutdown event, thus won't be able to match the two through identity comparison, which beats the purpose of passing the transport.\r\n\r\n\r\n@ejona86 Please review the PR as a whole. I will squash all the commits into one when I check it in.","created_at":"2016-02-22T18:36:30Z","updated_at":"2016-02-23T06:23:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":{"login":"ejona86","id":2811396,"avatar_url":"https://avatars.githubusercontent.com/u/2811396?v=3","gravatar_id":"","url":"https://api.github.com/users/ejona86","html_url":"https://github.com/ejona86","followers_url":"https://api.github.com/users/ejona86/followers","following_url":"https://api.github.com/users/ejona86/following{/other_user}","gists_url":"https://api.github.com/users/ejona86/gists{/gist_id}","starred_url":"https://api.github.com/users/ejona86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ejona86/subscriptions","organizations_url":"https://api.github.com/users/ejona86/orgs","repos_url":"https://api.github.com/users/ejona86/repos","events_url":"https://api.github.com/users/ejona86/events{/privacy}","received_events_url":"https://api.github.com/users/ejona86/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/grpc/grpc-java/pulls/1465/commits","review_comments_url":"https://api.github.com/repos/grpc/grpc-java/pulls/1465/comments","review_comment_url":"https://api.github.com/repos/grpc/grpc-java/pulls/comments{/number}","comments_url":"https://api.github.com/repos/grpc/grpc-java/issues/1465/comments","statuses_url":"https://api.github.com/repos/grpc/grpc-java/statuses/482dfc4ffaf752bf75cc4349c53f50c1469be45a","head":{"label":"zhangkun83:no_transport_future","ref":"no_transport_future","sha":"482dfc4ffaf752bf75cc4349c53f50c1469be45a","user":{"login":"zhangkun83","id":9053690,"avatar_url":"https://avatars.githubusercontent.com/u/9053690?v=3","gravatar_id":"","url":"https://api.github.com/users/zhangkun83","html_url":"https://github.com/zhangkun83","followers_url":"https://api.github.com/users/zhangkun83/followers","following_url":"https://api.github.com/users/zhangkun83/following{/other_user}","gists_url":"https://api.github.com/users/zhangkun83/gists{/gist_id}","starred_url":"https://api.github.com/users/zhangkun83/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhangkun83/subscriptions","organizations_url":"https://api.github.com/users/zhangkun83/orgs","repos_url":"https://api.github.com/users/zhangkun83/repos","events_url":"https://api.github.com/users/zhangkun83/events{/privacy}","received_events_url":"https://api.github.com/users/zhangkun83/received_events","type":"User","site_admin":false},"repo":{"id":31399597,"name":"grpc-java","full_name":"zhangkun83/grpc-java","owner":{"login":"zhangkun83","id":9053690,"avatar_url":"https://avatars.githubusercontent.com/u/9053690?v=3","gravatar_id":"","url":"https://api.github.com/users/zhangkun83","html_url":"https://github.com/zhangkun83","followers_url":"https://api.github.com/users/zhangkun83/followers","following_url":"https://api.github.com/users/zhangkun83/following{/other_user}","gists_url":"https://api.github.com/users/zhangkun83/gists{/gist_id}","starred_url":"https://api.github.com/users/zhangkun83/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhangkun83/subscriptions","organizations_url":"https://api.github.com/users/zhangkun83/orgs","repos_url":"https://api.github.com/users/zhangkun83/repos","events_url":"https://api.github.com/users/zhangkun83/events{/privacy}","received_events_url":"https://api.github.com/users/zhangkun83/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zhangkun83/grpc-java","description":"The Java gRPC implementation. HTTP/2 based RPC","fork":true,"url":"https://api.github.com/repos/zhangkun83/grpc-java","forks_url":"https://api.github.com/repos/zhangkun83/grpc-java/forks","keys_url":"https://api.github.com/repos/zhangkun83/grpc-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zhangkun83/grpc-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zhangkun83/grpc-java/teams","hooks_url":"https://api.github.com/repos/zhangkun83/grpc-java/hooks","issue_events_url":"https://api.github.com/repos/zhangkun83/grpc-java/issues/events{/number}","events_url":"https://api.github.com/repos/zhangkun83/grpc-java/events","assignees_url":"https://api.github.com/repos/zhangkun83/grpc-java/assignees{/user}","branches_url":"https://api.github.com/repos/zhangkun83/grpc-java/branches{/branch}","tags_url":"https://api.github.com/repos/zhangkun83/grpc-java/tags","blobs_url":"https://api.github.com/repos/zhangkun83/grpc-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zhangkun83/grpc-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zhangkun83/grpc-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/zhangkun83/grpc-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zhangkun83/grpc-java/statuses/{sha}","languages_url":"https://api.github.com/repos/zhangkun83/grpc-java/languages","stargazers_url":"https://api.github.com/repos/zhangkun83/grpc-java/stargazers","contributors_url":"https://api.github.com/repos/zhangkun83/grpc-java/contributors","subscribers_url":"https://api.github.com/repos/zhangkun83/grpc-java/subscribers","subscription_url":"https://api.github.com/repos/zhangkun83/grpc-java/subscription","commits_url":"https://api.github.com/repos/zhangkun83/grpc-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/zhangkun83/grpc-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/zhangkun83/grpc-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/zhangkun83/grpc-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/zhangkun83/grpc-java/contents/{+path}","compare_url":"https://api.github.com/repos/zhangkun83/grpc-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zhangkun83/grpc-java/merges","archive_url":"https://api.github.com/repos/zhangkun83/grpc-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zhangkun83/grpc-java/downloads","issues_url":"https://api.github.com/repos/zhangkun83/grpc-java/issues{/number}","pulls_url":"https://api.github.com/repos/zhangkun83/grpc-java/pulls{/number}","milestones_url":"https://api.github.com/repos/zhangkun83/grpc-java/milestones{/number}","notifications_url":"https://api.github.com/repos/zhangkun83/grpc-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zhangkun83/grpc-java/labels{/name}","releases_url":"https://api.github.com/repos/zhangkun83/grpc-java/releases{/id}","deployments_url":"https://api.github.com/repos/zhangkun83/grpc-java/deployments","created_at":"2015-02-27T02:25:11Z","updated_at":"2016-01-22T23:33:39Z","pushed_at":"2016-02-22T18:27:52Z","git_url":"git://github.com/zhangkun83/grpc-java.git","ssh_url":"git@github.com:zhangkun83/grpc-java.git","clone_url":"https://github.com/zhangkun83/grpc-java.git","svn_url":"https://github.com/zhangkun83/grpc-java","homepage":"","size":5373,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"grpc:master","ref":"master","sha":"8d0267fc414d860617a7efc23110e243a0251ff6","user":{"login":"grpc","id":7802525,"avatar_url":"https://avatars.githubusercontent.com/u/7802525?v=3","gravatar_id":"","url":"https://api.github.com/users/grpc","html_url":"https://github.com/grpc","followers_url":"https://api.github.com/users/grpc/followers","following_url":"https://api.github.com/users/grpc/following{/other_user}","gists_url":"https://api.github.com/users/grpc/gists{/gist_id}","starred_url":"https://api.github.com/users/grpc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grpc/subscriptions","organizations_url":"https://api.github.com/users/grpc/orgs","repos_url":"https://api.github.com/users/grpc/repos","events_url":"https://api.github.com/users/grpc/events{/privacy}","received_events_url":"https://api.github.com/users/grpc/received_events","type":"Organization","site_admin":false},"repo":{"id":27729926,"name":"grpc-java","full_name":"grpc/grpc-java","owner":{"login":"grpc","id":7802525,"avatar_url":"https://avatars.githubusercontent.com/u/7802525?v=3","gravatar_id":"","url":"https://api.github.com/users/grpc","html_url":"https://github.com/grpc","followers_url":"https://api.github.com/users/grpc/followers","following_url":"https://api.github.com/users/grpc/following{/other_user}","gists_url":"https://api.github.com/users/grpc/gists{/gist_id}","starred_url":"https://api.github.com/users/grpc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grpc/subscriptions","organizations_url":"https://api.github.com/users/grpc/orgs","repos_url":"https://api.github.com/users/grpc/repos","events_url":"https://api.github.com/users/grpc/events{/privacy}","received_events_url":"https://api.github.com/users/grpc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/grpc/grpc-java","description":"The Java gRPC implementation. HTTP/2 based RPC","fork":false,"url":"https://api.github.com/repos/grpc/grpc-java","forks_url":"https://api.github.com/repos/grpc/grpc-java/forks","keys_url":"https://api.github.com/repos/grpc/grpc-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/grpc/grpc-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/grpc/grpc-java/teams","hooks_url":"https://api.github.com/repos/grpc/grpc-java/hooks","issue_events_url":"https://api.github.com/repos/grpc/grpc-java/issues/events{/number}","events_url":"https://api.github.com/repos/grpc/grpc-java/events","assignees_url":"https://api.github.com/repos/grpc/grpc-java/assignees{/user}","branches_url":"https://api.github.com/repos/grpc/grpc-java/branches{/branch}","tags_url":"https://api.github.com/repos/grpc/grpc-java/tags","blobs_url":"https://api.github.com/repos/grpc/grpc-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/grpc/grpc-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/grpc/grpc-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/grpc/grpc-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/grpc/grpc-java/statuses/{sha}","languages_url":"https://api.github.com/repos/grpc/grpc-java/languages","stargazers_url":"https://api.github.com/repos/grpc/grpc-java/stargazers","contributors_url":"https://api.github.com/repos/grpc/grpc-java/contributors","subscribers_url":"https://api.github.com/repos/grpc/grpc-java/subscribers","subscription_url":"https://api.github.com/repos/grpc/grpc-java/subscription","commits_url":"https://api.github.com/repos/grpc/grpc-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/grpc/grpc-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/grpc/grpc-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/grpc/grpc-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/grpc/grpc-java/contents/{+path}","compare_url":"https://api.github.com/repos/grpc/grpc-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/grpc/grpc-java/merges","archive_url":"https://api.github.com/repos/grpc/grpc-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/grpc/grpc-java/downloads","issues_url":"https://api.github.com/repos/grpc/grpc-java/issues{/number}","pulls_url":"https://api.github.com/repos/grpc/grpc-java/pulls{/number}","milestones_url":"https://api.github.com/repos/grpc/grpc-java/milestones{/number}","notifications_url":"https://api.github.com/repos/grpc/grpc-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/grpc/grpc-java/labels{/name}","releases_url":"https://api.github.com/repos/grpc/grpc-java/releases{/id}","deployments_url":"https://api.github.com/repos/grpc/grpc-java/deployments","created_at":"2014-12-08T19:00:00Z","updated_at":"2016-02-22T15:42:47Z","pushed_at":"2016-02-23T01:19:50Z","git_url":"git://github.com/grpc/grpc-java.git","ssh_url":"git@github.com:grpc/grpc-java.git","clone_url":"https://github.com/grpc/grpc-java.git","svn_url":"https://github.com/grpc/grpc-java","homepage":"http://grpc.io","size":20878,"stargazers_count":1154,"watchers_count":1154,"language":"Java","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":true,"forks_count":299,"mirror_url":null,"open_issues_count":121,"forks":299,"open_issues":121,"watchers":1154,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/grpc/grpc-java/pulls/1465"},"html":{"href":"https://github.com/grpc/grpc-java/pull/1465"},"issue":{"href":"https://api.github.com/repos/grpc/grpc-java/issues/1465"},"comments":{"href":"https://api.github.com/repos/grpc/grpc-java/issues/1465/comments"},"review_comments":{"href":"https://api.github.com/repos/grpc/grpc-java/pulls/1465/comments"},"review_comment":{"href":"https://api.github.com/repos/grpc/grpc-java/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/grpc/grpc-java/pulls/1465/commits"},"statuses":{"href":"https://api.github.com/repos/grpc/grpc-java/statuses/482dfc4ffaf752bf75cc4349c53f50c1469be45a"}}}}