{"action":"created","comment":{"url":"https://api.github.com/repos/Korean88/Mentoring/pulls/comments/52926207","id":52926207,"diff_hunk":"@@ -0,0 +1,35 @@\n+package com.epam.concurrency.run;\n+\n+import config.SpringConfig;\n+import org.apache.log4j.Logger;\n+import org.springframework.context.ApplicationContext;\n+import org.springframework.context.annotation.AnnotationConfigApplicationContext;\n+\n+import java.util.concurrent.*;\n+\n+/**\n+ * Created by Andrey Yun on 13.02.2016.\n+ */\n+public class Runner {\n+\n+    private static final Logger LOG = Logger.getLogger(Runner.class);\n+\n+    private static final int NUMBER_OF_CONSUMERS_PRODUCERS = 10;\n+\n+    public static void main(String[] args) {\n+        ApplicationContext ctx = new AnnotationConfigApplicationContext(SpringConfig.class);\n+        ExecutorService exex = Executors.newCachedThreadPool();\n+        try {\n+            for (int i = 0; i < NUMBER_OF_CONSUMERS_PRODUCERS; i++) {\n+                Consumer consumer = (Consumer) ctx.getBean(SpringConfig.CONSUMER_BEAN_NAME);\n+                Producer producer = (Producer) ctx.getBean(SpringConfig.PRODUCER_BEAN_NAME);\n+                exex.execute(consumer);\n+                exex.execute(producer);\n+            }\n+        } catch (Exception e) {","path":"Threads/task7/src/main/java/com/epam/concurrency/run/Runner.java","position":29,"original_position":29,"commit_id":"ac4f1261e9c7355dff15defd8856cd83be24ef51","original_commit_id":"ac4f1261e9c7355dff15defd8856cd83be24ef51","user":{"login":"Korean88","id":5030367,"avatar_url":"https://avatars.githubusercontent.com/u/5030367?v=3","gravatar_id":"","url":"https://api.github.com/users/Korean88","html_url":"https://github.com/Korean88","followers_url":"https://api.github.com/users/Korean88/followers","following_url":"https://api.github.com/users/Korean88/following{/other_user}","gists_url":"https://api.github.com/users/Korean88/gists{/gist_id}","starred_url":"https://api.github.com/users/Korean88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Korean88/subscriptions","organizations_url":"https://api.github.com/users/Korean88/orgs","repos_url":"https://api.github.com/users/Korean88/repos","events_url":"https://api.github.com/users/Korean88/events{/privacy}","received_events_url":"https://api.github.com/users/Korean88/received_events","type":"User","site_admin":false},"body":"It was left here by mistake, will remove.","created_at":"2016-02-15T17:38:15Z","updated_at":"2016-02-15T17:38:15Z","html_url":"https://github.com/Korean88/Mentoring/pull/2#discussion_r52926207","pull_request_url":"https://api.github.com/repos/Korean88/Mentoring/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/Korean88/Mentoring/pulls/comments/52926207"},"html":{"href":"https://github.com/Korean88/Mentoring/pull/2#discussion_r52926207"},"pull_request":{"href":"https://api.github.com/repos/Korean88/Mentoring/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/Korean88/Mentoring/pulls/2","id":59293172,"html_url":"https://github.com/Korean88/Mentoring/pull/2","diff_url":"https://github.com/Korean88/Mentoring/pull/2.diff","patch_url":"https://github.com/Korean88/Mentoring/pull/2.patch","issue_url":"https://api.github.com/repos/Korean88/Mentoring/issues/2","number":2,"state":"open","locked":false,"title":"Concurrency task7","user":{"login":"Korean88","id":5030367,"avatar_url":"https://avatars.githubusercontent.com/u/5030367?v=3","gravatar_id":"","url":"https://api.github.com/users/Korean88","html_url":"https://github.com/Korean88","followers_url":"https://api.github.com/users/Korean88/followers","following_url":"https://api.github.com/users/Korean88/following{/other_user}","gists_url":"https://api.github.com/users/Korean88/gists{/gist_id}","starred_url":"https://api.github.com/users/Korean88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Korean88/subscriptions","organizations_url":"https://api.github.com/users/Korean88/orgs","repos_url":"https://api.github.com/users/Korean88/repos","events_url":"https://api.github.com/users/Korean88/events{/privacy}","received_events_url":"https://api.github.com/users/Korean88/received_events","type":"User","site_admin":false},"body":"Task 7 finished. Thanks to AtomicInteger and Java 8 :)","created_at":"2016-02-14T11:26:25Z","updated_at":"2016-02-15T17:38:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d040a1234a3ed1bf15cf6a49ebdd5411d30e154c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Korean88/Mentoring/pulls/2/commits","review_comments_url":"https://api.github.com/repos/Korean88/Mentoring/pulls/2/comments","review_comment_url":"https://api.github.com/repos/Korean88/Mentoring/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Korean88/Mentoring/issues/2/comments","statuses_url":"https://api.github.com/repos/Korean88/Mentoring/statuses/ac4f1261e9c7355dff15defd8856cd83be24ef51","head":{"label":"Korean88:concurrency_task7","ref":"concurrency_task7","sha":"ac4f1261e9c7355dff15defd8856cd83be24ef51","user":{"login":"Korean88","id":5030367,"avatar_url":"https://avatars.githubusercontent.com/u/5030367?v=3","gravatar_id":"","url":"https://api.github.com/users/Korean88","html_url":"https://github.com/Korean88","followers_url":"https://api.github.com/users/Korean88/followers","following_url":"https://api.github.com/users/Korean88/following{/other_user}","gists_url":"https://api.github.com/users/Korean88/gists{/gist_id}","starred_url":"https://api.github.com/users/Korean88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Korean88/subscriptions","organizations_url":"https://api.github.com/users/Korean88/orgs","repos_url":"https://api.github.com/users/Korean88/repos","events_url":"https://api.github.com/users/Korean88/events{/privacy}","received_events_url":"https://api.github.com/users/Korean88/received_events","type":"User","site_admin":false},"repo":{"id":49647993,"name":"Mentoring","full_name":"Korean88/Mentoring","owner":{"login":"Korean88","id":5030367,"avatar_url":"https://avatars.githubusercontent.com/u/5030367?v=3","gravatar_id":"","url":"https://api.github.com/users/Korean88","html_url":"https://github.com/Korean88","followers_url":"https://api.github.com/users/Korean88/followers","following_url":"https://api.github.com/users/Korean88/following{/other_user}","gists_url":"https://api.github.com/users/Korean88/gists{/gist_id}","starred_url":"https://api.github.com/users/Korean88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Korean88/subscriptions","organizations_url":"https://api.github.com/users/Korean88/orgs","repos_url":"https://api.github.com/users/Korean88/repos","events_url":"https://api.github.com/users/Korean88/events{/privacy}","received_events_url":"https://api.github.com/users/Korean88/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Korean88/Mentoring","description":"","fork":false,"url":"https://api.github.com/repos/Korean88/Mentoring","forks_url":"https://api.github.com/repos/Korean88/Mentoring/forks","keys_url":"https://api.github.com/repos/Korean88/Mentoring/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Korean88/Mentoring/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Korean88/Mentoring/teams","hooks_url":"https://api.github.com/repos/Korean88/Mentoring/hooks","issue_events_url":"https://api.github.com/repos/Korean88/Mentoring/issues/events{/number}","events_url":"https://api.github.com/repos/Korean88/Mentoring/events","assignees_url":"https://api.github.com/repos/Korean88/Mentoring/assignees{/user}","branches_url":"https://api.github.com/repos/Korean88/Mentoring/branches{/branch}","tags_url":"https://api.github.com/repos/Korean88/Mentoring/tags","blobs_url":"https://api.github.com/repos/Korean88/Mentoring/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Korean88/Mentoring/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Korean88/Mentoring/git/refs{/sha}","trees_url":"https://api.github.com/repos/Korean88/Mentoring/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Korean88/Mentoring/statuses/{sha}","languages_url":"https://api.github.com/repos/Korean88/Mentoring/languages","stargazers_url":"https://api.github.com/repos/Korean88/Mentoring/stargazers","contributors_url":"https://api.github.com/repos/Korean88/Mentoring/contributors","subscribers_url":"https://api.github.com/repos/Korean88/Mentoring/subscribers","subscription_url":"https://api.github.com/repos/Korean88/Mentoring/subscription","commits_url":"https://api.github.com/repos/Korean88/Mentoring/commits{/sha}","git_commits_url":"https://api.github.com/repos/Korean88/Mentoring/git/commits{/sha}","comments_url":"https://api.github.com/repos/Korean88/Mentoring/comments{/number}","issue_comment_url":"https://api.github.com/repos/Korean88/Mentoring/issues/comments{/number}","contents_url":"https://api.github.com/repos/Korean88/Mentoring/contents/{+path}","compare_url":"https://api.github.com/repos/Korean88/Mentoring/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Korean88/Mentoring/merges","archive_url":"https://api.github.com/repos/Korean88/Mentoring/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Korean88/Mentoring/downloads","issues_url":"https://api.github.com/repos/Korean88/Mentoring/issues{/number}","pulls_url":"https://api.github.com/repos/Korean88/Mentoring/pulls{/number}","milestones_url":"https://api.github.com/repos/Korean88/Mentoring/milestones{/number}","notifications_url":"https://api.github.com/repos/Korean88/Mentoring/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Korean88/Mentoring/labels{/name}","releases_url":"https://api.github.com/repos/Korean88/Mentoring/releases{/id}","deployments_url":"https://api.github.com/repos/Korean88/Mentoring/deployments","created_at":"2016-01-14T13:13:05Z","updated_at":"2016-01-16T12:56:47Z","pushed_at":"2016-02-15T17:05:13Z","git_url":"git://github.com/Korean88/Mentoring.git","ssh_url":"git@github.com:Korean88/Mentoring.git","clone_url":"https://github.com/Korean88/Mentoring.git","svn_url":"https://github.com/Korean88/Mentoring","homepage":null,"size":40,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"Korean88:master","ref":"master","sha":"5db8c6355f256c05959c91e07b0dcf6a6c5e68e3","user":{"login":"Korean88","id":5030367,"avatar_url":"https://avatars.githubusercontent.com/u/5030367?v=3","gravatar_id":"","url":"https://api.github.com/users/Korean88","html_url":"https://github.com/Korean88","followers_url":"https://api.github.com/users/Korean88/followers","following_url":"https://api.github.com/users/Korean88/following{/other_user}","gists_url":"https://api.github.com/users/Korean88/gists{/gist_id}","starred_url":"https://api.github.com/users/Korean88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Korean88/subscriptions","organizations_url":"https://api.github.com/users/Korean88/orgs","repos_url":"https://api.github.com/users/Korean88/repos","events_url":"https://api.github.com/users/Korean88/events{/privacy}","received_events_url":"https://api.github.com/users/Korean88/received_events","type":"User","site_admin":false},"repo":{"id":49647993,"name":"Mentoring","full_name":"Korean88/Mentoring","owner":{"login":"Korean88","id":5030367,"avatar_url":"https://avatars.githubusercontent.com/u/5030367?v=3","gravatar_id":"","url":"https://api.github.com/users/Korean88","html_url":"https://github.com/Korean88","followers_url":"https://api.github.com/users/Korean88/followers","following_url":"https://api.github.com/users/Korean88/following{/other_user}","gists_url":"https://api.github.com/users/Korean88/gists{/gist_id}","starred_url":"https://api.github.com/users/Korean88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Korean88/subscriptions","organizations_url":"https://api.github.com/users/Korean88/orgs","repos_url":"https://api.github.com/users/Korean88/repos","events_url":"https://api.github.com/users/Korean88/events{/privacy}","received_events_url":"https://api.github.com/users/Korean88/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Korean88/Mentoring","description":"","fork":false,"url":"https://api.github.com/repos/Korean88/Mentoring","forks_url":"https://api.github.com/repos/Korean88/Mentoring/forks","keys_url":"https://api.github.com/repos/Korean88/Mentoring/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Korean88/Mentoring/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Korean88/Mentoring/teams","hooks_url":"https://api.github.com/repos/Korean88/Mentoring/hooks","issue_events_url":"https://api.github.com/repos/Korean88/Mentoring/issues/events{/number}","events_url":"https://api.github.com/repos/Korean88/Mentoring/events","assignees_url":"https://api.github.com/repos/Korean88/Mentoring/assignees{/user}","branches_url":"https://api.github.com/repos/Korean88/Mentoring/branches{/branch}","tags_url":"https://api.github.com/repos/Korean88/Mentoring/tags","blobs_url":"https://api.github.com/repos/Korean88/Mentoring/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Korean88/Mentoring/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Korean88/Mentoring/git/refs{/sha}","trees_url":"https://api.github.com/repos/Korean88/Mentoring/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Korean88/Mentoring/statuses/{sha}","languages_url":"https://api.github.com/repos/Korean88/Mentoring/languages","stargazers_url":"https://api.github.com/repos/Korean88/Mentoring/stargazers","contributors_url":"https://api.github.com/repos/Korean88/Mentoring/contributors","subscribers_url":"https://api.github.com/repos/Korean88/Mentoring/subscribers","subscription_url":"https://api.github.com/repos/Korean88/Mentoring/subscription","commits_url":"https://api.github.com/repos/Korean88/Mentoring/commits{/sha}","git_commits_url":"https://api.github.com/repos/Korean88/Mentoring/git/commits{/sha}","comments_url":"https://api.github.com/repos/Korean88/Mentoring/comments{/number}","issue_comment_url":"https://api.github.com/repos/Korean88/Mentoring/issues/comments{/number}","contents_url":"https://api.github.com/repos/Korean88/Mentoring/contents/{+path}","compare_url":"https://api.github.com/repos/Korean88/Mentoring/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Korean88/Mentoring/merges","archive_url":"https://api.github.com/repos/Korean88/Mentoring/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Korean88/Mentoring/downloads","issues_url":"https://api.github.com/repos/Korean88/Mentoring/issues{/number}","pulls_url":"https://api.github.com/repos/Korean88/Mentoring/pulls{/number}","milestones_url":"https://api.github.com/repos/Korean88/Mentoring/milestones{/number}","notifications_url":"https://api.github.com/repos/Korean88/Mentoring/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Korean88/Mentoring/labels{/name}","releases_url":"https://api.github.com/repos/Korean88/Mentoring/releases{/id}","deployments_url":"https://api.github.com/repos/Korean88/Mentoring/deployments","created_at":"2016-01-14T13:13:05Z","updated_at":"2016-01-16T12:56:47Z","pushed_at":"2016-02-15T17:05:13Z","git_url":"git://github.com/Korean88/Mentoring.git","ssh_url":"git@github.com:Korean88/Mentoring.git","clone_url":"https://github.com/Korean88/Mentoring.git","svn_url":"https://github.com/Korean88/Mentoring","homepage":null,"size":40,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Korean88/Mentoring/pulls/2"},"html":{"href":"https://github.com/Korean88/Mentoring/pull/2"},"issue":{"href":"https://api.github.com/repos/Korean88/Mentoring/issues/2"},"comments":{"href":"https://api.github.com/repos/Korean88/Mentoring/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/Korean88/Mentoring/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/Korean88/Mentoring/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Korean88/Mentoring/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/Korean88/Mentoring/statuses/ac4f1261e9c7355dff15defd8856cd83be24ef51"}}}}