{"action":"created","comment":{"url":"https://api.github.com/repos/artekorzel/ieTanks/pulls/comments/23624651","id":23624651,"diff_hunk":"@@ -0,0 +1,45 @@\n+package pl.edu.agh.ietanks.ranking.service;\n+\n+import org.springframework.stereotype.Repository;\n+import pl.edu.agh.ietanks.ranking.api.Ranking;\n+import pl.edu.agh.ietanks.ranking.api.RankingId;\n+import pl.edu.agh.ietanks.ranking.api.RankingStorage;\n+import pl.edu.agh.ietanks.ranking.exceptions.RankingNotFoundException;\n+\n+import java.util.Map;\n+import java.util.Optional;\n+import java.util.concurrent.ConcurrentHashMap;\n+import java.util.concurrent.atomic.AtomicLong;\n+\n+@Repository\n+public class InMemoryRankingStorage implements RankingStorage {\n+\n+    private static final AtomicLong rankIdBase = new AtomicLong();\n+    private static final Map<RankingId, Ranking> gameRanksCache = new ConcurrentHashMap<>();\n+\n+    @Override\n+    public RankingId createRanking() {\n+        RankingId rankingId = new RankingId(\"\" + rankIdBase.incrementAndGet());","path":"ieTanks-ranking/src/main/java/pl/edu/agh/ietanks/ranking/service/InMemoryRankingStorage.java","position":22,"original_position":22,"commit_id":"41aa6145160340fde5e39d3e316d9265b02b447e","original_commit_id":"4d24d9a9cd4c0267a7ca913bd03ea3f4c209cf24","user":{"login":"Mequrel","id":656401,"avatar_url":"https://avatars.githubusercontent.com/u/656401?v=3","gravatar_id":"","url":"https://api.github.com/users/Mequrel","html_url":"https://github.com/Mequrel","followers_url":"https://api.github.com/users/Mequrel/followers","following_url":"https://api.github.com/users/Mequrel/following{/other_user}","gists_url":"https://api.github.com/users/Mequrel/gists{/gist_id}","starred_url":"https://api.github.com/users/Mequrel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mequrel/subscriptions","organizations_url":"https://api.github.com/users/Mequrel/orgs","repos_url":"https://api.github.com/users/Mequrel/repos","events_url":"https://api.github.com/users/Mequrel/events{/privacy}","received_events_url":"https://api.github.com/users/Mequrel/received_events","type":"User","site_admin":false},"body":".toString() is nicer :)","created_at":"2015-01-27T17:18:10Z","updated_at":"2015-01-27T17:18:11Z","html_url":"https://github.com/artekorzel/ieTanks/pull/49#discussion_r23624651","pull_request_url":"https://api.github.com/repos/artekorzel/ieTanks/pulls/49","_links":{"self":{"href":"https://api.github.com/repos/artekorzel/ieTanks/pulls/comments/23624651"},"html":{"href":"https://github.com/artekorzel/ieTanks/pull/49#discussion_r23624651"},"pull_request":{"href":"https://api.github.com/repos/artekorzel/ieTanks/pulls/49"}}},"pull_request":{"url":"https://api.github.com/repos/artekorzel/ieTanks/pulls/49","id":27997188,"html_url":"https://github.com/artekorzel/ieTanks/pull/49","diff_url":"https://github.com/artekorzel/ieTanks/pull/49.diff","patch_url":"https://github.com/artekorzel/ieTanks/pull/49.patch","issue_url":"https://api.github.com/repos/artekorzel/ieTanks/issues/49","number":49,"state":"open","locked":false,"title":"Ranking server-side implementation","user":{"login":"artekorzel","id":1753552,"avatar_url":"https://avatars.githubusercontent.com/u/1753552?v=3","gravatar_id":"","url":"https://api.github.com/users/artekorzel","html_url":"https://github.com/artekorzel","followers_url":"https://api.github.com/users/artekorzel/followers","following_url":"https://api.github.com/users/artekorzel/following{/other_user}","gists_url":"https://api.github.com/users/artekorzel/gists{/gist_id}","starred_url":"https://api.github.com/users/artekorzel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artekorzel/subscriptions","organizations_url":"https://api.github.com/users/artekorzel/orgs","repos_url":"https://api.github.com/users/artekorzel/repos","events_url":"https://api.github.com/users/artekorzel/events{/privacy}","received_events_url":"https://api.github.com/users/artekorzel/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-01-25T20:13:39Z","updated_at":"2015-01-27T17:18:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c4f1f0e44ede8d108a94905a612fe86d74480722","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/artekorzel/ieTanks/pulls/49/commits","review_comments_url":"https://api.github.com/repos/artekorzel/ieTanks/pulls/49/comments","review_comment_url":"https://api.github.com/repos/artekorzel/ieTanks/pulls/comments/{number}","comments_url":"https://api.github.com/repos/artekorzel/ieTanks/issues/49/comments","statuses_url":"https://api.github.com/repos/artekorzel/ieTanks/statuses/41aa6145160340fde5e39d3e316d9265b02b447e","head":{"label":"artekorzel:feature/rank","ref":"feature/rank","sha":"41aa6145160340fde5e39d3e316d9265b02b447e","user":{"login":"artekorzel","id":1753552,"avatar_url":"https://avatars.githubusercontent.com/u/1753552?v=3","gravatar_id":"","url":"https://api.github.com/users/artekorzel","html_url":"https://github.com/artekorzel","followers_url":"https://api.github.com/users/artekorzel/followers","following_url":"https://api.github.com/users/artekorzel/following{/other_user}","gists_url":"https://api.github.com/users/artekorzel/gists{/gist_id}","starred_url":"https://api.github.com/users/artekorzel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artekorzel/subscriptions","organizations_url":"https://api.github.com/users/artekorzel/orgs","repos_url":"https://api.github.com/users/artekorzel/repos","events_url":"https://api.github.com/users/artekorzel/events{/privacy}","received_events_url":"https://api.github.com/users/artekorzel/received_events","type":"User","site_admin":false},"repo":{"id":25263263,"name":"ieTanks","full_name":"artekorzel/ieTanks","owner":{"login":"artekorzel","id":1753552,"avatar_url":"https://avatars.githubusercontent.com/u/1753552?v=3","gravatar_id":"","url":"https://api.github.com/users/artekorzel","html_url":"https://github.com/artekorzel","followers_url":"https://api.github.com/users/artekorzel/followers","following_url":"https://api.github.com/users/artekorzel/following{/other_user}","gists_url":"https://api.github.com/users/artekorzel/gists{/gist_id}","starred_url":"https://api.github.com/users/artekorzel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artekorzel/subscriptions","organizations_url":"https://api.github.com/users/artekorzel/orgs","repos_url":"https://api.github.com/users/artekorzel/repos","events_url":"https://api.github.com/users/artekorzel/events{/privacy}","received_events_url":"https://api.github.com/users/artekorzel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/artekorzel/ieTanks","description":"","fork":false,"url":"https://api.github.com/repos/artekorzel/ieTanks","forks_url":"https://api.github.com/repos/artekorzel/ieTanks/forks","keys_url":"https://api.github.com/repos/artekorzel/ieTanks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/artekorzel/ieTanks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/artekorzel/ieTanks/teams","hooks_url":"https://api.github.com/repos/artekorzel/ieTanks/hooks","issue_events_url":"https://api.github.com/repos/artekorzel/ieTanks/issues/events{/number}","events_url":"https://api.github.com/repos/artekorzel/ieTanks/events","assignees_url":"https://api.github.com/repos/artekorzel/ieTanks/assignees{/user}","branches_url":"https://api.github.com/repos/artekorzel/ieTanks/branches{/branch}","tags_url":"https://api.github.com/repos/artekorzel/ieTanks/tags","blobs_url":"https://api.github.com/repos/artekorzel/ieTanks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/artekorzel/ieTanks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/artekorzel/ieTanks/git/refs{/sha}","trees_url":"https://api.github.com/repos/artekorzel/ieTanks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/artekorzel/ieTanks/statuses/{sha}","languages_url":"https://api.github.com/repos/artekorzel/ieTanks/languages","stargazers_url":"https://api.github.com/repos/artekorzel/ieTanks/stargazers","contributors_url":"https://api.github.com/repos/artekorzel/ieTanks/contributors","subscribers_url":"https://api.github.com/repos/artekorzel/ieTanks/subscribers","subscription_url":"https://api.github.com/repos/artekorzel/ieTanks/subscription","commits_url":"https://api.github.com/repos/artekorzel/ieTanks/commits{/sha}","git_commits_url":"https://api.github.com/repos/artekorzel/ieTanks/git/commits{/sha}","comments_url":"https://api.github.com/repos/artekorzel/ieTanks/comments{/number}","issue_comment_url":"https://api.github.com/repos/artekorzel/ieTanks/issues/comments/{number}","contents_url":"https://api.github.com/repos/artekorzel/ieTanks/contents/{+path}","compare_url":"https://api.github.com/repos/artekorzel/ieTanks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/artekorzel/ieTanks/merges","archive_url":"https://api.github.com/repos/artekorzel/ieTanks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/artekorzel/ieTanks/downloads","issues_url":"https://api.github.com/repos/artekorzel/ieTanks/issues{/number}","pulls_url":"https://api.github.com/repos/artekorzel/ieTanks/pulls{/number}","milestones_url":"https://api.github.com/repos/artekorzel/ieTanks/milestones{/number}","notifications_url":"https://api.github.com/repos/artekorzel/ieTanks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/artekorzel/ieTanks/labels{/name}","releases_url":"https://api.github.com/repos/artekorzel/ieTanks/releases{/id}","created_at":"2014-10-15T16:24:11Z","updated_at":"2014-11-14T16:29:19Z","pushed_at":"2015-01-27T17:17:11Z","git_url":"git://github.com/artekorzel/ieTanks.git","ssh_url":"git@github.com:artekorzel/ieTanks.git","clone_url":"https://github.com/artekorzel/ieTanks.git","svn_url":"https://github.com/artekorzel/ieTanks","homepage":null,"size":1609,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":4,"forks":5,"open_issues":4,"watchers":0,"default_branch":"master"}},"base":{"label":"artekorzel:develop","ref":"develop","sha":"3ff4147dc9b6468c4b41cb487f351f7d71ff7d06","user":{"login":"artekorzel","id":1753552,"avatar_url":"https://avatars.githubusercontent.com/u/1753552?v=3","gravatar_id":"","url":"https://api.github.com/users/artekorzel","html_url":"https://github.com/artekorzel","followers_url":"https://api.github.com/users/artekorzel/followers","following_url":"https://api.github.com/users/artekorzel/following{/other_user}","gists_url":"https://api.github.com/users/artekorzel/gists{/gist_id}","starred_url":"https://api.github.com/users/artekorzel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artekorzel/subscriptions","organizations_url":"https://api.github.com/users/artekorzel/orgs","repos_url":"https://api.github.com/users/artekorzel/repos","events_url":"https://api.github.com/users/artekorzel/events{/privacy}","received_events_url":"https://api.github.com/users/artekorzel/received_events","type":"User","site_admin":false},"repo":{"id":25263263,"name":"ieTanks","full_name":"artekorzel/ieTanks","owner":{"login":"artekorzel","id":1753552,"avatar_url":"https://avatars.githubusercontent.com/u/1753552?v=3","gravatar_id":"","url":"https://api.github.com/users/artekorzel","html_url":"https://github.com/artekorzel","followers_url":"https://api.github.com/users/artekorzel/followers","following_url":"https://api.github.com/users/artekorzel/following{/other_user}","gists_url":"https://api.github.com/users/artekorzel/gists{/gist_id}","starred_url":"https://api.github.com/users/artekorzel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artekorzel/subscriptions","organizations_url":"https://api.github.com/users/artekorzel/orgs","repos_url":"https://api.github.com/users/artekorzel/repos","events_url":"https://api.github.com/users/artekorzel/events{/privacy}","received_events_url":"https://api.github.com/users/artekorzel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/artekorzel/ieTanks","description":"","fork":false,"url":"https://api.github.com/repos/artekorzel/ieTanks","forks_url":"https://api.github.com/repos/artekorzel/ieTanks/forks","keys_url":"https://api.github.com/repos/artekorzel/ieTanks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/artekorzel/ieTanks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/artekorzel/ieTanks/teams","hooks_url":"https://api.github.com/repos/artekorzel/ieTanks/hooks","issue_events_url":"https://api.github.com/repos/artekorzel/ieTanks/issues/events{/number}","events_url":"https://api.github.com/repos/artekorzel/ieTanks/events","assignees_url":"https://api.github.com/repos/artekorzel/ieTanks/assignees{/user}","branches_url":"https://api.github.com/repos/artekorzel/ieTanks/branches{/branch}","tags_url":"https://api.github.com/repos/artekorzel/ieTanks/tags","blobs_url":"https://api.github.com/repos/artekorzel/ieTanks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/artekorzel/ieTanks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/artekorzel/ieTanks/git/refs{/sha}","trees_url":"https://api.github.com/repos/artekorzel/ieTanks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/artekorzel/ieTanks/statuses/{sha}","languages_url":"https://api.github.com/repos/artekorzel/ieTanks/languages","stargazers_url":"https://api.github.com/repos/artekorzel/ieTanks/stargazers","contributors_url":"https://api.github.com/repos/artekorzel/ieTanks/contributors","subscribers_url":"https://api.github.com/repos/artekorzel/ieTanks/subscribers","subscription_url":"https://api.github.com/repos/artekorzel/ieTanks/subscription","commits_url":"https://api.github.com/repos/artekorzel/ieTanks/commits{/sha}","git_commits_url":"https://api.github.com/repos/artekorzel/ieTanks/git/commits{/sha}","comments_url":"https://api.github.com/repos/artekorzel/ieTanks/comments{/number}","issue_comment_url":"https://api.github.com/repos/artekorzel/ieTanks/issues/comments/{number}","contents_url":"https://api.github.com/repos/artekorzel/ieTanks/contents/{+path}","compare_url":"https://api.github.com/repos/artekorzel/ieTanks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/artekorzel/ieTanks/merges","archive_url":"https://api.github.com/repos/artekorzel/ieTanks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/artekorzel/ieTanks/downloads","issues_url":"https://api.github.com/repos/artekorzel/ieTanks/issues{/number}","pulls_url":"https://api.github.com/repos/artekorzel/ieTanks/pulls{/number}","milestones_url":"https://api.github.com/repos/artekorzel/ieTanks/milestones{/number}","notifications_url":"https://api.github.com/repos/artekorzel/ieTanks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/artekorzel/ieTanks/labels{/name}","releases_url":"https://api.github.com/repos/artekorzel/ieTanks/releases{/id}","created_at":"2014-10-15T16:24:11Z","updated_at":"2014-11-14T16:29:19Z","pushed_at":"2015-01-27T17:17:11Z","git_url":"git://github.com/artekorzel/ieTanks.git","ssh_url":"git@github.com:artekorzel/ieTanks.git","clone_url":"https://github.com/artekorzel/ieTanks.git","svn_url":"https://github.com/artekorzel/ieTanks","homepage":null,"size":1609,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":4,"forks":5,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/artekorzel/ieTanks/pulls/49"},"html":{"href":"https://github.com/artekorzel/ieTanks/pull/49"},"issue":{"href":"https://api.github.com/repos/artekorzel/ieTanks/issues/49"},"comments":{"href":"https://api.github.com/repos/artekorzel/ieTanks/issues/49/comments"},"review_comments":{"href":"https://api.github.com/repos/artekorzel/ieTanks/pulls/49/comments"},"review_comment":{"href":"https://api.github.com/repos/artekorzel/ieTanks/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/artekorzel/ieTanks/pulls/49/commits"},"statuses":{"href":"https://api.github.com/repos/artekorzel/ieTanks/statuses/41aa6145160340fde5e39d3e316d9265b02b447e"}}}}