GitHub PullRequestReviewCommentEvent at 2014-10-01 14:39:20
Repository: datomisca
Actor: mandubian
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/pellucidanalytics/datomisca/pulls/comments/18282459","id":18282459,"diff_hunk":"@@ -16,27 +16,171 @@\n \n package datomisca\n \n+import scala.collection.breakOut\n+import scala.collection.JavaConverters._\n+import scala.concurrent.duration._\n+\n import java.{util => ju}\n import java.util.{concurrent => juc}\n \n+\n+/** The data queue associated with a connection.\n+  *\n+  * At any point in time either zero or one queue is associated with\n+  * a connection.\n+  *\n+  * This queue may be safely consumed from more than one thread.\n+  * Note that the queue does not block producers, and will consume\n+  * memory until you consume the elements from it.\n+\n+  * Reports will be added to the queue at some point after the\n+  * database has been updated.\n+  * If the associated connection originated the transaction, the\n+  * transaction future will be notified first, before a report is\n+  * placed on this queue.\n+  *\n+  * @param  queue  the underlying transaction report queue.\n+  * @see [[http://docs.datomic.com/javadoc/datomic/Connection.html#txReportQueue() datomic.Connection.txReportQueue()]]\n+  */\n class TxReportQueue(\n     val queue:    juc.BlockingQueue[ju.Map[_, _]]\n-) {\n+) extends AnyVal {\n+\n+\n+  /** Removes all available transaction reports from\n+    * this queue and returns them as a list.\n+    *\n+    * This operation may be more efficient than repeatedly\n+    * polling this queue.\n+    *\n+    * @return a list of all available tranaction reports.\n+    */\n+  def drain(): List[TxReport] = {\n+    val c = new ju.LinkedList[ju.Map[_, _]]\n+    queue.drainTo(c)\n+    c.asScala.map(new TxReport(_))(breakOut)","path":"core/src/main/scala/datomisca/TxReportQueue.scala","position":47,"original_position":47,"commit_id":"366ff0fc42db9eee913eb035671dc876c1faa948","original_commit_id":"366ff0fc42db9eee913eb035671dc876c1faa948","user":{"login":"mandubian","id":77193,"avatar_url":"https://avatars.githubusercontent.com/u/77193?v=2","gravatar_id":"","url":"https://api.github.com/users/mandubian","html_url":"https://github.com/mandubian","followers_url":"https://api.github.com/users/mandubian/followers","following_url":"https://api.github.com/users/mandubian/following{/other_user}","gists_url":"https://api.github.com/users/mandubian/gists{/gist_id}","starred_url":"https://api.github.com/users/mandubian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mandubian/subscriptions","organizations_url":"https://api.github.com/users/mandubian/orgs","repos_url":"https://api.github.com/users/mandubian/repos","events_url":"https://api.github.com/users/mandubian/events{/privacy}","received_events_url":"https://api.github.com/users/mandubian/received_events","type":"User","site_admin":false},"body":"`breakOut` works in this case too? Nice :)","created_at":"2014-10-01T14:39:20Z","updated_at":"2014-10-01T14:39:20Z","html_url":"https://github.com/pellucidanalytics/datomisca/pull/132#discussion_r18282459","pull_request_url":"https://api.github.com/repos/pellucidanalytics/datomisca/pulls/132","_links":{"self":{"href":"https://api.github.com/repos/pellucidanalytics/datomisca/pulls/comments/18282459"},"html":{"href":"https://github.com/pellucidanalytics/datomisca/pull/132#discussion_r18282459"},"pull_request":{"href":"https://api.github.com/repos/pellucidanalytics/datomisca/pulls/132"}}},"pull_request":{"url":"https://api.github.com/repos/pellucidanalytics/datomisca/pulls/132","id":22048929,"html_url":"https://github.com/pellucidanalytics/datomisca/pull/132","diff_url":"https://github.com/pellucidanalytics/datomisca/pull/132.diff","patch_url":"https://github.com/pellucidanalytics/datomisca/pull/132.patch","issue_url":"https://api.github.com/repos/pellucidanalytics/datomisca/issues/132","number":132,"state":"open","locked":false,"title":"new API for TxReportQueue (fixes #128)","user":{"login":"dwhjames","id":470008,"avatar_url":"https://avatars.githubusercontent.com/u/470008?v=2","gravatar_id":"","url":"https://api.github.com/users/dwhjames","html_url":"https://github.com/dwhjames","followers_url":"https://api.github.com/users/dwhjames/followers","following_url":"https://api.github.com/users/dwhjames/following{/other_user}","gists_url":"https://api.github.com/users/dwhjames/gists{/gist_id}","starred_url":"https://api.github.com/users/dwhjames/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dwhjames/subscriptions","organizations_url":"https://api.github.com/users/dwhjames/orgs","repos_url":"https://api.github.com/users/dwhjames/repos","events_url":"https://api.github.com/users/dwhjames/events{/privacy}","received_events_url":"https://api.github.com/users/dwhjames/received_events","type":"User","site_admin":false},"body":"make an idiomatic version of the read size of the java.util.concurrent.BlockingQueue interface.","created_at":"2014-10-01T02:41:39Z","updated_at":"2014-10-01T14:39:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0ae1027582715f1f4c7d05d2acf68c3898a0bcd0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/pellucidanalytics/datomisca/pulls/132/commits","review_comments_url":"https://api.github.com/repos/pellucidanalytics/datomisca/pulls/132/comments","review_comment_url":"https://api.github.com/repos/pellucidanalytics/datomisca/pulls/comments/{number}","comments_url":"https://api.github.com/repos/pellucidanalytics/datomisca/issues/132/comments","statuses_url":"https://api.github.com/repos/pellucidanalytics/datomisca/statuses/366ff0fc42db9eee913eb035671dc876c1faa948","head":{"label":"dwhjames:topic/tx-report-queue","ref":"topic/tx-report-queue","sha":"366ff0fc42db9eee913eb035671dc876c1faa948","user":{"login":"dwhjames","id":470008,"avatar_url":"https://avatars.githubusercontent.com/u/470008?v=2","gravatar_id":"","url":"https://api.github.com/users/dwhjames","html_url":"https://github.com/dwhjames","followers_url":"https://api.github.com/users/dwhjames/followers","following_url":"https://api.github.com/users/dwhjames/following{/other_user}","gists_url":"https://api.github.com/users/dwhjames/gists{/gist_id}","starred_url":"https://api.github.com/users/dwhjames/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dwhjames/subscriptions","organizations_url":"https://api.github.com/users/dwhjames/orgs","repos_url":"https://api.github.com/users/dwhjames/repos","events_url":"https://api.github.com/users/dwhjames/events{/privacy}","received_events_url":"https://api.github.com/users/dwhjames/received_events","type":"User","site_admin":false},"repo":{"id":23297567,"name":"datomisca","full_name":"dwhjames/datomisca","owner":{"login":"dwhjames","id":470008,"avatar_url":"https://avatars.githubusercontent.com/u/470008?v=2","gravatar_id":"","url":"https://api.github.com/users/dwhjames","html_url":"https://github.com/dwhjames","followers_url":"https://api.github.com/users/dwhjames/followers","following_url":"https://api.github.com/users/dwhjames/following{/other_user}","gists_url":"https://api.github.com/users/dwhjames/gists{/gist_id}","starred_url":"https://api.github.com/users/dwhjames/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dwhjames/subscriptions","organizations_url":"https://api.github.com/users/dwhjames/orgs","repos_url":"https://api.github.com/users/dwhjames/repos","events_url":"https://api.github.com/users/dwhjames/events{/privacy}","received_events_url":"https://api.github.com/users/dwhjames/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dwhjames/datomisca","description":"Datomisca: a Scala API for Datomic","fork":true,"url":"https://api.github.com/repos/dwhjames/datomisca","forks_url":"https://api.github.com/repos/dwhjames/datomisca/forks","keys_url":"https://api.github.com/repos/dwhjames/datomisca/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dwhjames/datomisca/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dwhjames/datomisca/teams","hooks_url":"https://api.github.com/repos/dwhjames/datomisca/hooks","issue_events_url":"https://api.github.com/repos/dwhjames/datomisca/issues/events{/number}","events_url":"https://api.github.com/repos/dwhjames/datomisca/events","assignees_url":"https://api.github.com/repos/dwhjames/datomisca/assignees{/user}","branches_url":"https://api.github.com/repos/dwhjames/datomisca/branches{/branch}","tags_url":"https://api.github.com/repos/dwhjames/datomisca/tags","blobs_url":"https://api.github.com/repos/dwhjames/datomisca/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dwhjames/datomisca/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dwhjames/datomisca/git/refs{/sha}","trees_url":"https://api.github.com/repos/dwhjames/datomisca/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dwhjames/datomisca/statuses/{sha}","languages_url":"https://api.github.com/repos/dwhjames/datomisca/languages","stargazers_url":"https://api.github.com/repos/dwhjames/datomisca/stargazers","contributors_url":"https://api.github.com/repos/dwhjames/datomisca/contributors","subscribers_url":"https://api.github.com/repos/dwhjames/datomisca/subscribers","subscription_url":"https://api.github.com/repos/dwhjames/datomisca/subscription","commits_url":"https://api.github.com/repos/dwhjames/datomisca/commits{/sha}","git_commits_url":"https://api.github.com/repos/dwhjames/datomisca/git/commits{/sha}","comments_url":"https://api.github.com/repos/dwhjames/datomisca/comments{/number}","issue_comment_url":"https://api.github.com/repos/dwhjames/datomisca/issues/comments/{number}","contents_url":"https://api.github.com/repos/dwhjames/datomisca/contents/{+path}","compare_url":"https://api.github.com/repos/dwhjames/datomisca/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dwhjames/datomisca/merges","archive_url":"https://api.github.com/repos/dwhjames/datomisca/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dwhjames/datomisca/downloads","issues_url":"https://api.github.com/repos/dwhjames/datomisca/issues{/number}","pulls_url":"https://api.github.com/repos/dwhjames/datomisca/pulls{/number}","milestones_url":"https://api.github.com/repos/dwhjames/datomisca/milestones{/number}","notifications_url":"https://api.github.com/repos/dwhjames/datomisca/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dwhjames/datomisca/labels{/name}","releases_url":"https://api.github.com/repos/dwhjames/datomisca/releases{/id}","created_at":"2014-08-25T01:04:45Z","updated_at":"2014-09-30T02:44:13Z","pushed_at":"2014-10-01T02:41:06Z","git_url":"git://github.com/dwhjames/datomisca.git","ssh_url":"git@github.com:dwhjames/datomisca.git","clone_url":"https://github.com/dwhjames/datomisca.git","svn_url":"https://github.com/dwhjames/datomisca","homepage":"http://pellucidanalytics.github.com/datomisca/","size":14454,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"pellucidanalytics:develop","ref":"develop","sha":"da82bdd696c6c169c65699657b76297451f08376","user":{"login":"pellucidanalytics","id":1606427,"avatar_url":"https://avatars.githubusercontent.com/u/1606427?v=2","gravatar_id":"","url":"https://api.github.com/users/pellucidanalytics","html_url":"https://github.com/pellucidanalytics","followers_url":"https://api.github.com/users/pellucidanalytics/followers","following_url":"https://api.github.com/users/pellucidanalytics/following{/other_user}","gists_url":"https://api.github.com/users/pellucidanalytics/gists{/gist_id}","starred_url":"https://api.github.com/users/pellucidanalytics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pellucidanalytics/subscriptions","organizations_url":"https://api.github.com/users/pellucidanalytics/orgs","repos_url":"https://api.github.com/users/pellucidanalytics/repos","events_url":"https://api.github.com/users/pellucidanalytics/events{/privacy}","received_events_url":"https://api.github.com/users/pellucidanalytics/received_events","type":"Organization","site_admin":false},"repo":{"id":6044925,"name":"datomisca","full_name":"pellucidanalytics/datomisca","owner":{"login":"pellucidanalytics","id":1606427,"avatar_url":"https://avatars.githubusercontent.com/u/1606427?v=2","gravatar_id":"","url":"https://api.github.com/users/pellucidanalytics","html_url":"https://github.com/pellucidanalytics","followers_url":"https://api.github.com/users/pellucidanalytics/followers","following_url":"https://api.github.com/users/pellucidanalytics/following{/other_user}","gists_url":"https://api.github.com/users/pellucidanalytics/gists{/gist_id}","starred_url":"https://api.github.com/users/pellucidanalytics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pellucidanalytics/subscriptions","organizations_url":"https://api.github.com/users/pellucidanalytics/orgs","repos_url":"https://api.github.com/users/pellucidanalytics/repos","events_url":"https://api.github.com/users/pellucidanalytics/events{/privacy}","received_events_url":"https://api.github.com/users/pellucidanalytics/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pellucidanalytics/datomisca","description":"Datomisca: a Scala API for Datomic","fork":false,"url":"https://api.github.com/repos/pellucidanalytics/datomisca","forks_url":"https://api.github.com/repos/pellucidanalytics/datomisca/forks","keys_url":"https://api.github.com/repos/pellucidanalytics/datomisca/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pellucidanalytics/datomisca/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pellucidanalytics/datomisca/teams","hooks_url":"https://api.github.com/repos/pellucidanalytics/datomisca/hooks","issue_events_url":"https://api.github.com/repos/pellucidanalytics/datomisca/issues/events{/number}","events_url":"https://api.github.com/repos/pellucidanalytics/datomisca/events","assignees_url":"https://api.github.com/repos/pellucidanalytics/datomisca/assignees{/user}","branches_url":"https://api.github.com/repos/pellucidanalytics/datomisca/branches{/branch}","tags_url":"https://api.github.com/repos/pellucidanalytics/datomisca/tags","blobs_url":"https://api.github.com/repos/pellucidanalytics/datomisca/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pellucidanalytics/datomisca/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pellucidanalytics/datomisca/git/refs{/sha}","trees_url":"https://api.github.com/repos/pellucidanalytics/datomisca/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pellucidanalytics/datomisca/statuses/{sha}","languages_url":"https://api.github.com/repos/pellucidanalytics/datomisca/languages","stargazers_url":"https://api.github.com/repos/pellucidanalytics/datomisca/stargazers","contributors_url":"https://api.github.com/repos/pellucidanalytics/datomisca/contributors","subscribers_url":"https://api.github.com/repos/pellucidanalytics/datomisca/subscribers","subscription_url":"https://api.github.com/repos/pellucidanalytics/datomisca/subscription","commits_url":"https://api.github.com/repos/pellucidanalytics/datomisca/commits{/sha}","git_commits_url":"https://api.github.com/repos/pellucidanalytics/datomisca/git/commits{/sha}","comments_url":"https://api.github.com/repos/pellucidanalytics/datomisca/comments{/number}","issue_comment_url":"https://api.github.com/repos/pellucidanalytics/datomisca/issues/comments/{number}","contents_url":"https://api.github.com/repos/pellucidanalytics/datomisca/contents/{+path}","compare_url":"https://api.github.com/repos/pellucidanalytics/datomisca/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pellucidanalytics/datomisca/merges","archive_url":"https://api.github.com/repos/pellucidanalytics/datomisca/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pellucidanalytics/datomisca/downloads","issues_url":"https://api.github.com/repos/pellucidanalytics/datomisca/issues{/number}","pulls_url":"https://api.github.com/repos/pellucidanalytics/datomisca/pulls{/number}","milestones_url":"https://api.github.com/repos/pellucidanalytics/datomisca/milestones{/number}","notifications_url":"https://api.github.com/repos/pellucidanalytics/datomisca/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pellucidanalytics/datomisca/labels{/name}","releases_url":"https://api.github.com/repos/pellucidanalytics/datomisca/releases{/id}","created_at":"2012-10-02T13:01:36Z","updated_at":"2014-09-17T01:35:33Z","pushed_at":"2014-09-30T02:41:22Z","git_url":"git://github.com/pellucidanalytics/datomisca.git","ssh_url":"git@github.com:pellucidanalytics/datomisca.git","clone_url":"https://github.com/pellucidanalytics/datomisca.git","svn_url":"https://github.com/pellucidanalytics/datomisca","homepage":"http://pellucidanalytics.github.com/datomisca/","size":16910,"stargazers_count":91,"watchers_count":91,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":18,"mirror_url":null,"open_issues_count":5,"forks":18,"open_issues":5,"watchers":91,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/pellucidanalytics/datomisca/pulls/132"},"html":{"href":"https://github.com/pellucidanalytics/datomisca/pull/132"},"issue":{"href":"https://api.github.com/repos/pellucidanalytics/datomisca/issues/132"},"comments":{"href":"https://api.github.com/repos/pellucidanalytics/datomisca/issues/132/comments"},"review_comments":{"href":"https://api.github.com/repos/pellucidanalytics/datomisca/pulls/132/comments"},"review_comment":{"href":"https://api.github.com/repos/pellucidanalytics/datomisca/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/pellucidanalytics/datomisca/pulls/132/commits"},"statuses":{"href":"https://api.github.com/repos/pellucidanalytics/datomisca/statuses/366ff0fc42db9eee913eb035671dc876c1faa948"}}}}