{"action":"created","comment":{"url":"https://api.github.com/repos/aurusov/raox/pulls/comments/48090869","id":48090869,"diff_hunk":"@@ -0,0 +1,39 @@\n+package ru.bmstu.rk9.rao.lib.process;\n+\n+import java.util.LinkedList;\n+import ru.bmstu.rk9.rao.lib.process.Process.ProcessStatus;\n+\n+public class Queue implements Block {\n+\n+\tprivate InputDock inputDock = new InputDock();\n+\tprivate OutputDock outputDock = new OutputDock();\n+\tprivate java.util.Queue<Transact> queue = new LinkedList<Transact>();\n+\n+\tpublic InputDock getInputDock() {\n+\t\treturn inputDock;\n+\t}\n+\n+\tpublic OutputDock getOutputDock() {\n+\t\treturn outputDock;\n+\t}\n+\n+\t@Override\n+\tpublic ProcessStatus check() {\n+\t\tboolean success = false;\n+\t\tTransact inputTransact = inputDock.pullTransact();\n+\t\tif (inputTransact != null) {\n+\t\t\tqueue.offer(inputTransact);\n+\t\t\tsuccess = true;\n+\t\t}\n+\n+\t\tTransact outputTransact = queue.peek();\n+\t\tif (outputTransact != null) {\n+\t\t\tif (outputDock.pushTransact(outputTransact)) {\n+\t\t\t\tqueue.remove();\n+\t\t\t\tsuccess = true;\n+\t\t\t}\n+\t\t}\n+\t\treturn success ? ProcessStatus.SUCCESS : ProcessStatus.NOTHING_TO_DO;","path":"ru.bmstu.rk9.rao.lib/src/ru/bmstu/rk9/rao/lib/process/Queue.java","position":36,"original_position":36,"commit_id":"16bf29e2fae261714ccb7470df77b9de337867f6","original_commit_id":"16bf29e2fae261714ccb7470df77b9de337867f6","user":{"login":"LeKaitoW","id":10632455,"avatar_url":"https://avatars.githubusercontent.com/u/10632455?v=3","gravatar_id":"","url":"https://api.github.com/users/LeKaitoW","html_url":"https://github.com/LeKaitoW","followers_url":"https://api.github.com/users/LeKaitoW/followers","following_url":"https://api.github.com/users/LeKaitoW/following{/other_user}","gists_url":"https://api.github.com/users/LeKaitoW/gists{/gist_id}","starred_url":"https://api.github.com/users/LeKaitoW/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LeKaitoW/subscriptions","organizations_url":"https://api.github.com/users/LeKaitoW/orgs","repos_url":"https://api.github.com/users/LeKaitoW/repos","events_url":"https://api.github.com/users/LeKaitoW/events{/privacy}","received_events_url":"https://api.github.com/users/LeKaitoW/received_events","type":"User","site_admin":false},"body":"+","created_at":"2015-12-19T09:41:42Z","updated_at":"2015-12-19T09:41:42Z","html_url":"https://github.com/aurusov/raox/pull/284#discussion_r48090869","pull_request_url":"https://api.github.com/repos/aurusov/raox/pulls/284","_links":{"self":{"href":"https://api.github.com/repos/aurusov/raox/pulls/comments/48090869"},"html":{"href":"https://github.com/aurusov/raox/pull/284#discussion_r48090869"},"pull_request":{"href":"https://api.github.com/repos/aurusov/raox/pulls/284"}}},"pull_request":{"url":"https://api.github.com/repos/aurusov/raox/pulls/284","id":53089464,"html_url":"https://github.com/aurusov/raox/pull/284","diff_url":"https://github.com/aurusov/raox/pull/284.diff","patch_url":"https://github.com/aurusov/raox/pull/284.patch","issue_url":"https://api.github.com/repos/aurusov/raox/issues/284","number":284,"state":"open","locked":false,"title":"Feature/process","user":{"login":"LeKaitoW","id":10632455,"avatar_url":"https://avatars.githubusercontent.com/u/10632455?v=3","gravatar_id":"","url":"https://api.github.com/users/LeKaitoW","html_url":"https://github.com/LeKaitoW","followers_url":"https://api.github.com/users/LeKaitoW/followers","following_url":"https://api.github.com/users/LeKaitoW/following{/other_user}","gists_url":"https://api.github.com/users/LeKaitoW/gists{/gist_id}","starred_url":"https://api.github.com/users/LeKaitoW/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LeKaitoW/subscriptions","organizations_url":"https://api.github.com/users/LeKaitoW/orgs","repos_url":"https://api.github.com/users/LeKaitoW/repos","events_url":"https://api.github.com/users/LeKaitoW/events{/privacy}","received_events_url":"https://api.github.com/users/LeKaitoW/received_events","type":"User","site_admin":false},"body":"Пулл-реквест процессного подхода","created_at":"2015-12-09T08:30:14Z","updated_at":"2015-12-19T09:41:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f1b87231780cc4d934a512746ae6e74024415b42","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/aurusov/raox/pulls/284/commits","review_comments_url":"https://api.github.com/repos/aurusov/raox/pulls/284/comments","review_comment_url":"https://api.github.com/repos/aurusov/raox/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aurusov/raox/issues/284/comments","statuses_url":"https://api.github.com/repos/aurusov/raox/statuses/16bf29e2fae261714ccb7470df77b9de337867f6","head":{"label":"LeKaitoW:feature/process","ref":"feature/process","sha":"16bf29e2fae261714ccb7470df77b9de337867f6","user":{"login":"LeKaitoW","id":10632455,"avatar_url":"https://avatars.githubusercontent.com/u/10632455?v=3","gravatar_id":"","url":"https://api.github.com/users/LeKaitoW","html_url":"https://github.com/LeKaitoW","followers_url":"https://api.github.com/users/LeKaitoW/followers","following_url":"https://api.github.com/users/LeKaitoW/following{/other_user}","gists_url":"https://api.github.com/users/LeKaitoW/gists{/gist_id}","starred_url":"https://api.github.com/users/LeKaitoW/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LeKaitoW/subscriptions","organizations_url":"https://api.github.com/users/LeKaitoW/orgs","repos_url":"https://api.github.com/users/LeKaitoW/repos","events_url":"https://api.github.com/users/LeKaitoW/events{/privacy}","received_events_url":"https://api.github.com/users/LeKaitoW/received_events","type":"User","site_admin":false},"repo":{"id":29748527,"name":"rdo-xtext","full_name":"LeKaitoW/rdo-xtext","owner":{"login":"LeKaitoW","id":10632455,"avatar_url":"https://avatars.githubusercontent.com/u/10632455?v=3","gravatar_id":"","url":"https://api.github.com/users/LeKaitoW","html_url":"https://github.com/LeKaitoW","followers_url":"https://api.github.com/users/LeKaitoW/followers","following_url":"https://api.github.com/users/LeKaitoW/following{/other_user}","gists_url":"https://api.github.com/users/LeKaitoW/gists{/gist_id}","starred_url":"https://api.github.com/users/LeKaitoW/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LeKaitoW/subscriptions","organizations_url":"https://api.github.com/users/LeKaitoW/orgs","repos_url":"https://api.github.com/users/LeKaitoW/repos","events_url":"https://api.github.com/users/LeKaitoW/events{/privacy}","received_events_url":"https://api.github.com/users/LeKaitoW/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/LeKaitoW/rdo-xtext","description":"RDO modelling language written in Xtext","fork":true,"url":"https://api.github.com/repos/LeKaitoW/rdo-xtext","forks_url":"https://api.github.com/repos/LeKaitoW/rdo-xtext/forks","keys_url":"https://api.github.com/repos/LeKaitoW/rdo-xtext/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LeKaitoW/rdo-xtext/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LeKaitoW/rdo-xtext/teams","hooks_url":"https://api.github.com/repos/LeKaitoW/rdo-xtext/hooks","issue_events_url":"https://api.github.com/repos/LeKaitoW/rdo-xtext/issues/events{/number}","events_url":"https://api.github.com/repos/LeKaitoW/rdo-xtext/events","assignees_url":"https://api.github.com/repos/LeKaitoW/rdo-xtext/assignees{/user}","branches_url":"https://api.github.com/repos/LeKaitoW/rdo-xtext/branches{/branch}","tags_url":"https://api.github.com/repos/LeKaitoW/rdo-xtext/tags","blobs_url":"https://api.github.com/repos/LeKaitoW/rdo-xtext/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LeKaitoW/rdo-xtext/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LeKaitoW/rdo-xtext/git/refs{/sha}","trees_url":"https://api.github.com/repos/LeKaitoW/rdo-xtext/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LeKaitoW/rdo-xtext/statuses/{sha}","languages_url":"https://api.github.com/repos/LeKaitoW/rdo-xtext/languages","stargazers_url":"https://api.github.com/repos/LeKaitoW/rdo-xtext/stargazers","contributors_url":"https://api.github.com/repos/LeKaitoW/rdo-xtext/contributors","subscribers_url":"https://api.github.com/repos/LeKaitoW/rdo-xtext/subscribers","subscription_url":"https://api.github.com/repos/LeKaitoW/rdo-xtext/subscription","commits_url":"https://api.github.com/repos/LeKaitoW/rdo-xtext/commits{/sha}","git_commits_url":"https://api.github.com/repos/LeKaitoW/rdo-xtext/git/commits{/sha}","comments_url":"https://api.github.com/repos/LeKaitoW/rdo-xtext/comments{/number}","issue_comment_url":"https://api.github.com/repos/LeKaitoW/rdo-xtext/issues/comments{/number}","contents_url":"https://api.github.com/repos/LeKaitoW/rdo-xtext/contents/{+path}","compare_url":"https://api.github.com/repos/LeKaitoW/rdo-xtext/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LeKaitoW/rdo-xtext/merges","archive_url":"https://api.github.com/repos/LeKaitoW/rdo-xtext/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LeKaitoW/rdo-xtext/downloads","issues_url":"https://api.github.com/repos/LeKaitoW/rdo-xtext/issues{/number}","pulls_url":"https://api.github.com/repos/LeKaitoW/rdo-xtext/pulls{/number}","milestones_url":"https://api.github.com/repos/LeKaitoW/rdo-xtext/milestones{/number}","notifications_url":"https://api.github.com/repos/LeKaitoW/rdo-xtext/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LeKaitoW/rdo-xtext/labels{/name}","releases_url":"https://api.github.com/repos/LeKaitoW/rdo-xtext/releases{/id}","created_at":"2015-01-23T19:14:30Z","updated_at":"2015-05-07T13:07:27Z","pushed_at":"2015-12-12T09:34:09Z","git_url":"git://github.com/LeKaitoW/rdo-xtext.git","ssh_url":"git@github.com:LeKaitoW/rdo-xtext.git","clone_url":"https://github.com/LeKaitoW/rdo-xtext.git","svn_url":"https://github.com/LeKaitoW/rdo-xtext","homepage":"","size":8722,"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":7,"forks":0,"open_issues":7,"watchers":0,"default_branch":"feature/graphic_editor"}},"base":{"label":"aurusov:release/current","ref":"release/current","sha":"50c7975aa4c91a175c61d33966a909e7573547c1","user":{"login":"aurusov","id":5585202,"avatar_url":"https://avatars.githubusercontent.com/u/5585202?v=3","gravatar_id":"","url":"https://api.github.com/users/aurusov","html_url":"https://github.com/aurusov","followers_url":"https://api.github.com/users/aurusov/followers","following_url":"https://api.github.com/users/aurusov/following{/other_user}","gists_url":"https://api.github.com/users/aurusov/gists{/gist_id}","starred_url":"https://api.github.com/users/aurusov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aurusov/subscriptions","organizations_url":"https://api.github.com/users/aurusov/orgs","repos_url":"https://api.github.com/users/aurusov/repos","events_url":"https://api.github.com/users/aurusov/events{/privacy}","received_events_url":"https://api.github.com/users/aurusov/received_events","type":"User","site_admin":false},"repo":{"id":17812682,"name":"raox","full_name":"aurusov/raox","owner":{"login":"aurusov","id":5585202,"avatar_url":"https://avatars.githubusercontent.com/u/5585202?v=3","gravatar_id":"","url":"https://api.github.com/users/aurusov","html_url":"https://github.com/aurusov","followers_url":"https://api.github.com/users/aurusov/followers","following_url":"https://api.github.com/users/aurusov/following{/other_user}","gists_url":"https://api.github.com/users/aurusov/gists{/gist_id}","starred_url":"https://api.github.com/users/aurusov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aurusov/subscriptions","organizations_url":"https://api.github.com/users/aurusov/orgs","repos_url":"https://api.github.com/users/aurusov/repos","events_url":"https://api.github.com/users/aurusov/events{/privacy}","received_events_url":"https://api.github.com/users/aurusov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aurusov/raox","description":"Rdo modelling language written in Xtext","fork":false,"url":"https://api.github.com/repos/aurusov/raox","forks_url":"https://api.github.com/repos/aurusov/raox/forks","keys_url":"https://api.github.com/repos/aurusov/raox/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aurusov/raox/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aurusov/raox/teams","hooks_url":"https://api.github.com/repos/aurusov/raox/hooks","issue_events_url":"https://api.github.com/repos/aurusov/raox/issues/events{/number}","events_url":"https://api.github.com/repos/aurusov/raox/events","assignees_url":"https://api.github.com/repos/aurusov/raox/assignees{/user}","branches_url":"https://api.github.com/repos/aurusov/raox/branches{/branch}","tags_url":"https://api.github.com/repos/aurusov/raox/tags","blobs_url":"https://api.github.com/repos/aurusov/raox/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aurusov/raox/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aurusov/raox/git/refs{/sha}","trees_url":"https://api.github.com/repos/aurusov/raox/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aurusov/raox/statuses/{sha}","languages_url":"https://api.github.com/repos/aurusov/raox/languages","stargazers_url":"https://api.github.com/repos/aurusov/raox/stargazers","contributors_url":"https://api.github.com/repos/aurusov/raox/contributors","subscribers_url":"https://api.github.com/repos/aurusov/raox/subscribers","subscription_url":"https://api.github.com/repos/aurusov/raox/subscription","commits_url":"https://api.github.com/repos/aurusov/raox/commits{/sha}","git_commits_url":"https://api.github.com/repos/aurusov/raox/git/commits{/sha}","comments_url":"https://api.github.com/repos/aurusov/raox/comments{/number}","issue_comment_url":"https://api.github.com/repos/aurusov/raox/issues/comments{/number}","contents_url":"https://api.github.com/repos/aurusov/raox/contents/{+path}","compare_url":"https://api.github.com/repos/aurusov/raox/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aurusov/raox/merges","archive_url":"https://api.github.com/repos/aurusov/raox/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aurusov/raox/downloads","issues_url":"https://api.github.com/repos/aurusov/raox/issues{/number}","pulls_url":"https://api.github.com/repos/aurusov/raox/pulls{/number}","milestones_url":"https://api.github.com/repos/aurusov/raox/milestones{/number}","notifications_url":"https://api.github.com/repos/aurusov/raox/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aurusov/raox/labels{/name}","releases_url":"https://api.github.com/repos/aurusov/raox/releases{/id}","created_at":"2014-03-17T00:15:25Z","updated_at":"2015-12-05T17:39:18Z","pushed_at":"2015-12-12T09:34:09Z","git_url":"git://github.com/aurusov/raox.git","ssh_url":"git@github.com:aurusov/raox.git","clone_url":"https://github.com/aurusov/raox.git","svn_url":"https://github.com/aurusov/raox","homepage":"http://www.rdostudio.com/","size":16716,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":71,"forks":11,"open_issues":71,"watchers":1,"default_branch":"release/current"}},"_links":{"self":{"href":"https://api.github.com/repos/aurusov/raox/pulls/284"},"html":{"href":"https://github.com/aurusov/raox/pull/284"},"issue":{"href":"https://api.github.com/repos/aurusov/raox/issues/284"},"comments":{"href":"https://api.github.com/repos/aurusov/raox/issues/284/comments"},"review_comments":{"href":"https://api.github.com/repos/aurusov/raox/pulls/284/comments"},"review_comment":{"href":"https://api.github.com/repos/aurusov/raox/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aurusov/raox/pulls/284/commits"},"statuses":{"href":"https://api.github.com/repos/aurusov/raox/statuses/16bf29e2fae261714ccb7470df77b9de337867f6"}}}}