{"action":"created","comment":{"url":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/comments/23891589","id":23891589,"diff_hunk":"@@ -24,12 +24,58 @@\n  */\n package org.spongepowered.api.world.storage;\n \n+import com.flowpowered.math.vector.Vector3i;\n+import com.google.common.base.Optional;\n+import org.spongepowered.api.service.persistence.data.DataContainer;\n+import org.spongepowered.api.world.Chunk;\n+\n+import java.util.concurrent.Future;\n+\n public interface WorldStorage {\n \n     /**\n-     * Gets a {@link ChunkIterator}.\n+     * Gets a {@link ChunkDataStream}.\n+     *\n+     * <p>Usage of a {@link ChunkDataStream} should be limited to asynchronous\n+     * tasks to avoid hanging the main thread.</p>\n+     *\n      * @return An iterator of generated chunks\n      */\n-    ChunkIterator getGeneratedChunks();\n+    ChunkDataStream getGeneratedChunks();\n+\n+    /**\n+     * Checks if the given chunk coordinates represented by {@link Vector3i}\n+     * exist in the world.\n+     *\n+     * <p>Note that this is an asynchronous check as the storage of chunks\n+     * can not be guaranteed to remain in synch with the server, let alone\n+     * on the server thread.</p>\n+     *\n+     * <p>It is imperative to avoid waiting for the {@link Future} to complete\n+     * its task.</p>","path":"src/main/java/org/spongepowered/api/world/storage/WorldStorage.java","position":34,"original_position":34,"commit_id":"99cf3f9cf71e4a1dbbe230eeefa0c77fdbb18343","original_commit_id":"0c81806e01982094af70b8354aa30849b6f3d1fc","user":{"login":"Kobata","id":2323933,"avatar_url":"https://avatars.githubusercontent.com/u/2323933?v=3","gravatar_id":"","url":"https://api.github.com/users/Kobata","html_url":"https://github.com/Kobata","followers_url":"https://api.github.com/users/Kobata/followers","following_url":"https://api.github.com/users/Kobata/following{/other_user}","gists_url":"https://api.github.com/users/Kobata/gists{/gist_id}","starred_url":"https://api.github.com/users/Kobata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kobata/subscriptions","organizations_url":"https://api.github.com/users/Kobata/orgs","repos_url":"https://api.github.com/users/Kobata/repos","events_url":"https://api.github.com/users/Kobata/events{/privacy}","received_events_url":"https://api.github.com/users/Kobata/received_events","type":"User","site_admin":false},"body":"You changed line 73, not this line (54). There were two copies of the same text.","created_at":"2015-01-31T20:05:20Z","updated_at":"2015-01-31T20:05:20Z","html_url":"https://github.com/SpongePowered/SpongeAPI/pull/420#discussion_r23891589","pull_request_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/420","_links":{"self":{"href":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/comments/23891589"},"html":{"href":"https://github.com/SpongePowered/SpongeAPI/pull/420#discussion_r23891589"},"pull_request":{"href":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/420"}}},"pull_request":{"url":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/420","id":28173964,"html_url":"https://github.com/SpongePowered/SpongeAPI/pull/420","diff_url":"https://github.com/SpongePowered/SpongeAPI/pull/420.diff","patch_url":"https://github.com/SpongePowered/SpongeAPI/pull/420.patch","issue_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/420","number":420,"state":"open","locked":false,"title":"Blazing fast ChunkDataStreams","user":{"login":"gabizou","id":1203877,"avatar_url":"https://avatars.githubusercontent.com/u/1203877?v=3","gravatar_id":"","url":"https://api.github.com/users/gabizou","html_url":"https://github.com/gabizou","followers_url":"https://api.github.com/users/gabizou/followers","following_url":"https://api.github.com/users/gabizou/following{/other_user}","gists_url":"https://api.github.com/users/gabizou/gists{/gist_id}","starred_url":"https://api.github.com/users/gabizou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabizou/subscriptions","organizations_url":"https://api.github.com/users/gabizou/orgs","repos_url":"https://api.github.com/users/gabizou/repos","events_url":"https://api.github.com/users/gabizou/events{/privacy}","received_events_url":"https://api.github.com/users/gabizou/received_events","type":"User","site_admin":false},"body":"Fixes #256 \r\n\r\nThe previous API did not specify whether `ChunkIterator` would be blocking on the main thread and provided little ways to read specific chunk data.\r\n\r\nThis adds the ability to get a specific `Chunk`s data via asynchronous [`Future`](http://docs.oracle.com/javase/6/docs/api/java/util/concurrent/Future.html) and aids in refining the asynchronous nature of `ChunkDataStream`.\r\n","created_at":"2015-01-28T07:43:55Z","updated_at":"2015-01-31T20:05:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7f192bab94b490b496948d4670c8fb9789957a94","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/420/commits","review_comments_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/420/comments","review_comment_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/comments/{number}","comments_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/420/comments","statuses_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/statuses/99cf3f9cf71e4a1dbbe230eeefa0c77fdbb18343","head":{"label":"SpongePowered:feature/chunk-data-stream","ref":"feature/chunk-data-stream","sha":"99cf3f9cf71e4a1dbbe230eeefa0c77fdbb18343","user":{"login":"SpongePowered","id":8683473,"avatar_url":"https://avatars.githubusercontent.com/u/8683473?v=3","gravatar_id":"","url":"https://api.github.com/users/SpongePowered","html_url":"https://github.com/SpongePowered","followers_url":"https://api.github.com/users/SpongePowered/followers","following_url":"https://api.github.com/users/SpongePowered/following{/other_user}","gists_url":"https://api.github.com/users/SpongePowered/gists{/gist_id}","starred_url":"https://api.github.com/users/SpongePowered/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SpongePowered/subscriptions","organizations_url":"https://api.github.com/users/SpongePowered/orgs","repos_url":"https://api.github.com/users/SpongePowered/repos","events_url":"https://api.github.com/users/SpongePowered/events{/privacy}","received_events_url":"https://api.github.com/users/SpongePowered/received_events","type":"Organization","site_admin":false},"repo":{"id":23770421,"name":"SpongeAPI","full_name":"SpongePowered/SpongeAPI","owner":{"login":"SpongePowered","id":8683473,"avatar_url":"https://avatars.githubusercontent.com/u/8683473?v=3","gravatar_id":"","url":"https://api.github.com/users/SpongePowered","html_url":"https://github.com/SpongePowered","followers_url":"https://api.github.com/users/SpongePowered/followers","following_url":"https://api.github.com/users/SpongePowered/following{/other_user}","gists_url":"https://api.github.com/users/SpongePowered/gists{/gist_id}","starred_url":"https://api.github.com/users/SpongePowered/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SpongePowered/subscriptions","organizations_url":"https://api.github.com/users/SpongePowered/orgs","repos_url":"https://api.github.com/users/SpongePowered/repos","events_url":"https://api.github.com/users/SpongePowered/events{/privacy}","received_events_url":"https://api.github.com/users/SpongePowered/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SpongePowered/SpongeAPI","description":"A Minecraft plugin API","fork":false,"url":"https://api.github.com/repos/SpongePowered/SpongeAPI","forks_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/forks","keys_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/teams","hooks_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/hooks","issue_events_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/events{/number}","events_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/events","assignees_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/assignees{/user}","branches_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/branches{/branch}","tags_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/tags","blobs_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/git/refs{/sha}","trees_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/statuses/{sha}","languages_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/languages","stargazers_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/stargazers","contributors_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/contributors","subscribers_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/subscribers","subscription_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/subscription","commits_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/commits{/sha}","git_commits_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/git/commits{/sha}","comments_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/comments{/number}","issue_comment_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/comments/{number}","contents_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/contents/{+path}","compare_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/merges","archive_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/downloads","issues_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues{/number}","pulls_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls{/number}","milestones_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/milestones{/number}","notifications_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/labels{/name}","releases_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/releases{/id}","created_at":"2014-09-07T20:39:25Z","updated_at":"2015-01-31T10:24:35Z","pushed_at":"2015-01-31T19:41:07Z","git_url":"git://github.com/SpongePowered/SpongeAPI.git","ssh_url":"git@github.com:SpongePowered/SpongeAPI.git","clone_url":"https://github.com/SpongePowered/SpongeAPI.git","svn_url":"https://github.com/SpongePowered/SpongeAPI","homepage":"http://www.spongepowered.org/","size":13166,"stargazers_count":725,"watchers_count":725,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":334,"mirror_url":null,"open_issues_count":50,"forks":334,"open_issues":50,"watchers":725,"default_branch":"master"}},"base":{"label":"SpongePowered:master","ref":"master","sha":"77a469cc929c90f6f841daf98d6a7b0c6809d265","user":{"login":"SpongePowered","id":8683473,"avatar_url":"https://avatars.githubusercontent.com/u/8683473?v=3","gravatar_id":"","url":"https://api.github.com/users/SpongePowered","html_url":"https://github.com/SpongePowered","followers_url":"https://api.github.com/users/SpongePowered/followers","following_url":"https://api.github.com/users/SpongePowered/following{/other_user}","gists_url":"https://api.github.com/users/SpongePowered/gists{/gist_id}","starred_url":"https://api.github.com/users/SpongePowered/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SpongePowered/subscriptions","organizations_url":"https://api.github.com/users/SpongePowered/orgs","repos_url":"https://api.github.com/users/SpongePowered/repos","events_url":"https://api.github.com/users/SpongePowered/events{/privacy}","received_events_url":"https://api.github.com/users/SpongePowered/received_events","type":"Organization","site_admin":false},"repo":{"id":23770421,"name":"SpongeAPI","full_name":"SpongePowered/SpongeAPI","owner":{"login":"SpongePowered","id":8683473,"avatar_url":"https://avatars.githubusercontent.com/u/8683473?v=3","gravatar_id":"","url":"https://api.github.com/users/SpongePowered","html_url":"https://github.com/SpongePowered","followers_url":"https://api.github.com/users/SpongePowered/followers","following_url":"https://api.github.com/users/SpongePowered/following{/other_user}","gists_url":"https://api.github.com/users/SpongePowered/gists{/gist_id}","starred_url":"https://api.github.com/users/SpongePowered/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SpongePowered/subscriptions","organizations_url":"https://api.github.com/users/SpongePowered/orgs","repos_url":"https://api.github.com/users/SpongePowered/repos","events_url":"https://api.github.com/users/SpongePowered/events{/privacy}","received_events_url":"https://api.github.com/users/SpongePowered/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SpongePowered/SpongeAPI","description":"A Minecraft plugin API","fork":false,"url":"https://api.github.com/repos/SpongePowered/SpongeAPI","forks_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/forks","keys_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/teams","hooks_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/hooks","issue_events_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/events{/number}","events_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/events","assignees_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/assignees{/user}","branches_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/branches{/branch}","tags_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/tags","blobs_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/git/refs{/sha}","trees_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/statuses/{sha}","languages_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/languages","stargazers_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/stargazers","contributors_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/contributors","subscribers_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/subscribers","subscription_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/subscription","commits_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/commits{/sha}","git_commits_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/git/commits{/sha}","comments_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/comments{/number}","issue_comment_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/comments/{number}","contents_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/contents/{+path}","compare_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/merges","archive_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/downloads","issues_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues{/number}","pulls_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls{/number}","milestones_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/milestones{/number}","notifications_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/labels{/name}","releases_url":"https://api.github.com/repos/SpongePowered/SpongeAPI/releases{/id}","created_at":"2014-09-07T20:39:25Z","updated_at":"2015-01-31T10:24:35Z","pushed_at":"2015-01-31T19:41:07Z","git_url":"git://github.com/SpongePowered/SpongeAPI.git","ssh_url":"git@github.com:SpongePowered/SpongeAPI.git","clone_url":"https://github.com/SpongePowered/SpongeAPI.git","svn_url":"https://github.com/SpongePowered/SpongeAPI","homepage":"http://www.spongepowered.org/","size":13166,"stargazers_count":725,"watchers_count":725,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":334,"mirror_url":null,"open_issues_count":50,"forks":334,"open_issues":50,"watchers":725,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/420"},"html":{"href":"https://github.com/SpongePowered/SpongeAPI/pull/420"},"issue":{"href":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/420"},"comments":{"href":"https://api.github.com/repos/SpongePowered/SpongeAPI/issues/420/comments"},"review_comments":{"href":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/420/comments"},"review_comment":{"href":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/SpongePowered/SpongeAPI/pulls/420/commits"},"statuses":{"href":"https://api.github.com/repos/SpongePowered/SpongeAPI/statuses/99cf3f9cf71e4a1dbbe230eeefa0c77fdbb18343"}}}}