{"action":"created","comment":{"url":"https://api.github.com/repos/neo4j/neo4j/pulls/comments/33461929","id":33461929,"diff_hunk":"@@ -0,0 +1,116 @@\n+/*\n+ * Copyright (c) 2002-2015 \"Neo Technology,\"\n+ * Network Engine for Objects in Lund AB [http://neotechnology.com]\n+ *\n+ * This file is part of Neo4j.\n+ *\n+ * Neo4j is free software: you can redistribute it and/or modify\n+ * it under the terms of the GNU General Public License as published by\n+ * the Free Software Foundation, either version 3 of the License, or\n+ * (at your option) any later version.\n+ *\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.\n+ */\n+package org.neo4j.kernel.impl.api.cursor;\n+\n+import org.neo4j.function.Consumer;\n+import org.neo4j.graphdb.Direction;\n+import org.neo4j.kernel.api.cursor.LabelCursor;\n+import org.neo4j.kernel.api.cursor.NodeCursor;\n+import org.neo4j.kernel.api.cursor.PropertyCursor;\n+import org.neo4j.kernel.api.cursor.RelationshipCursor;\n+import org.neo4j.kernel.api.txstate.TransactionState;\n+import org.neo4j.kernel.impl.api.state.NodeState;\n+\n+/**\n+ * Overlays transaction state on a {@link NodeCursor}.\n+ */\n+public abstract class TxAbstractNodeCursor\n+        implements NodeCursor\n+{\n+    protected final TransactionState state;\n+    private final Consumer<TxAbstractNodeCursor> cache;","path":"community/kernel/src/main/java/org/neo4j/kernel/impl/api/cursor/TxAbstractNodeCursor.java","position":38,"original_position":38,"commit_id":"b83cb5283d57a16aa872ab37e8dea2e26d504b11","original_commit_id":"b83cb5283d57a16aa872ab37e8dea2e26d504b11","user":{"login":"lutovich","id":1638145,"avatar_url":"https://avatars.githubusercontent.com/u/1638145?v=3","gravatar_id":"","url":"https://api.github.com/users/lutovich","html_url":"https://github.com/lutovich","followers_url":"https://api.github.com/users/lutovich/followers","following_url":"https://api.github.com/users/lutovich/following{/other_user}","gists_url":"https://api.github.com/users/lutovich/gists{/gist_id}","starred_url":"https://api.github.com/users/lutovich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lutovich/subscriptions","organizations_url":"https://api.github.com/users/lutovich/orgs","repos_url":"https://api.github.com/users/lutovich/repos","events_url":"https://api.github.com/users/lutovich/events{/privacy}","received_events_url":"https://api.github.com/users/lutovich/received_events","type":"User","site_admin":false},"body":"Type of this field should be `Consumer<? extends TxAbstractNodeCursor>` to avoid casts in child classes like here: https://github.com/neo4j/neo4j/pull/4848/files#diff-417eb484057a4476ab620ff0e9fb1e7cR39.\r\nSame comment applies to `TxAbstractRelationshipCursor`.","created_at":"2015-06-29T13:16:41Z","updated_at":"2015-06-29T13:16:41Z","html_url":"https://github.com/neo4j/neo4j/pull/4848#discussion_r33461929","pull_request_url":"https://api.github.com/repos/neo4j/neo4j/pulls/4848","_links":{"self":{"href":"https://api.github.com/repos/neo4j/neo4j/pulls/comments/33461929"},"html":{"href":"https://github.com/neo4j/neo4j/pull/4848#discussion_r33461929"},"pull_request":{"href":"https://api.github.com/repos/neo4j/neo4j/pulls/4848"}}},"pull_request":{"url":"https://api.github.com/repos/neo4j/neo4j/pulls/4848","id":37969583,"html_url":"https://github.com/neo4j/neo4j/pull/4848","diff_url":"https://github.com/neo4j/neo4j/pull/4848.diff","patch_url":"https://github.com/neo4j/neo4j/pull/4848.patch","issue_url":"https://api.github.com/repos/neo4j/neo4j/issues/4848","number":4848,"state":"closed","locked":false,"title":"Cursors are now used in the transactional layer","user":{"login":"rickardoberg","id":461300,"avatar_url":"https://avatars.githubusercontent.com/u/461300?v=3","gravatar_id":"","url":"https://api.github.com/users/rickardoberg","html_url":"https://github.com/rickardoberg","followers_url":"https://api.github.com/users/rickardoberg/followers","following_url":"https://api.github.com/users/rickardoberg/following{/other_user}","gists_url":"https://api.github.com/users/rickardoberg/gists{/gist_id}","starred_url":"https://api.github.com/users/rickardoberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rickardoberg/subscriptions","organizations_url":"https://api.github.com/users/rickardoberg/orgs","repos_url":"https://api.github.com/users/rickardoberg/repos","events_url":"https://api.github.com/users/rickardoberg/events{/privacy}","received_events_url":"https://api.github.com/users/rickardoberg/received_events","type":"User","site_admin":false},"body":"If there is transactional state in a transaction, then the store layer cursors are decorated with transactional cursors that account for added, deleted, and updated state.\r\n\r\nCursors are no longer exposed from the transactional layer, as that is not yet properly implemented. TBD.\r\n\r\nUpdated all tests that used store layer mocks to instead use cursor mocks.\r\n\r\nApplied code formatting as well.","created_at":"2015-06-18T03:58:23Z","updated_at":"2015-06-29T13:16:41Z","closed_at":"2015-06-25T20:19:21Z","merged_at":"2015-06-25T20:19:21Z","merge_commit_sha":"6bb2b6a922779b6b3a5f43bb868af4c034c02ed3","assignee":{"login":"tinwelint","id":187292,"avatar_url":"https://avatars.githubusercontent.com/u/187292?v=3","gravatar_id":"","url":"https://api.github.com/users/tinwelint","html_url":"https://github.com/tinwelint","followers_url":"https://api.github.com/users/tinwelint/followers","following_url":"https://api.github.com/users/tinwelint/following{/other_user}","gists_url":"https://api.github.com/users/tinwelint/gists{/gist_id}","starred_url":"https://api.github.com/users/tinwelint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tinwelint/subscriptions","organizations_url":"https://api.github.com/users/tinwelint/orgs","repos_url":"https://api.github.com/users/tinwelint/repos","events_url":"https://api.github.com/users/tinwelint/events{/privacy}","received_events_url":"https://api.github.com/users/tinwelint/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/neo4j/neo4j/pulls/4848/commits","review_comments_url":"https://api.github.com/repos/neo4j/neo4j/pulls/4848/comments","review_comment_url":"https://api.github.com/repos/neo4j/neo4j/pulls/comments{/number}","comments_url":"https://api.github.com/repos/neo4j/neo4j/issues/4848/comments","statuses_url":"https://api.github.com/repos/neo4j/neo4j/statuses/b83cb5283d57a16aa872ab37e8dea2e26d504b11","head":{"label":"rickardoberg:txcursors","ref":"txcursors","sha":"b83cb5283d57a16aa872ab37e8dea2e26d504b11","user":{"login":"rickardoberg","id":461300,"avatar_url":"https://avatars.githubusercontent.com/u/461300?v=3","gravatar_id":"","url":"https://api.github.com/users/rickardoberg","html_url":"https://github.com/rickardoberg","followers_url":"https://api.github.com/users/rickardoberg/followers","following_url":"https://api.github.com/users/rickardoberg/following{/other_user}","gists_url":"https://api.github.com/users/rickardoberg/gists{/gist_id}","starred_url":"https://api.github.com/users/rickardoberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rickardoberg/subscriptions","organizations_url":"https://api.github.com/users/rickardoberg/orgs","repos_url":"https://api.github.com/users/rickardoberg/repos","events_url":"https://api.github.com/users/rickardoberg/events{/privacy}","received_events_url":"https://api.github.com/users/rickardoberg/received_events","type":"User","site_admin":false},"repo":{"id":6666802,"name":"neo4j","full_name":"rickardoberg/neo4j","owner":{"login":"rickardoberg","id":461300,"avatar_url":"https://avatars.githubusercontent.com/u/461300?v=3","gravatar_id":"","url":"https://api.github.com/users/rickardoberg","html_url":"https://github.com/rickardoberg","followers_url":"https://api.github.com/users/rickardoberg/followers","following_url":"https://api.github.com/users/rickardoberg/following{/other_user}","gists_url":"https://api.github.com/users/rickardoberg/gists{/gist_id}","starred_url":"https://api.github.com/users/rickardoberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rickardoberg/subscriptions","organizations_url":"https://api.github.com/users/rickardoberg/orgs","repos_url":"https://api.github.com/users/rickardoberg/repos","events_url":"https://api.github.com/users/rickardoberg/events{/privacy}","received_events_url":"https://api.github.com/users/rickardoberg/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rickardoberg/neo4j","description":"","fork":true,"url":"https://api.github.com/repos/rickardoberg/neo4j","forks_url":"https://api.github.com/repos/rickardoberg/neo4j/forks","keys_url":"https://api.github.com/repos/rickardoberg/neo4j/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rickardoberg/neo4j/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rickardoberg/neo4j/teams","hooks_url":"https://api.github.com/repos/rickardoberg/neo4j/hooks","issue_events_url":"https://api.github.com/repos/rickardoberg/neo4j/issues/events{/number}","events_url":"https://api.github.com/repos/rickardoberg/neo4j/events","assignees_url":"https://api.github.com/repos/rickardoberg/neo4j/assignees{/user}","branches_url":"https://api.github.com/repos/rickardoberg/neo4j/branches{/branch}","tags_url":"https://api.github.com/repos/rickardoberg/neo4j/tags","blobs_url":"https://api.github.com/repos/rickardoberg/neo4j/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rickardoberg/neo4j/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rickardoberg/neo4j/git/refs{/sha}","trees_url":"https://api.github.com/repos/rickardoberg/neo4j/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rickardoberg/neo4j/statuses/{sha}","languages_url":"https://api.github.com/repos/rickardoberg/neo4j/languages","stargazers_url":"https://api.github.com/repos/rickardoberg/neo4j/stargazers","contributors_url":"https://api.github.com/repos/rickardoberg/neo4j/contributors","subscribers_url":"https://api.github.com/repos/rickardoberg/neo4j/subscribers","subscription_url":"https://api.github.com/repos/rickardoberg/neo4j/subscription","commits_url":"https://api.github.com/repos/rickardoberg/neo4j/commits{/sha}","git_commits_url":"https://api.github.com/repos/rickardoberg/neo4j/git/commits{/sha}","comments_url":"https://api.github.com/repos/rickardoberg/neo4j/comments{/number}","issue_comment_url":"https://api.github.com/repos/rickardoberg/neo4j/issues/comments{/number}","contents_url":"https://api.github.com/repos/rickardoberg/neo4j/contents/{+path}","compare_url":"https://api.github.com/repos/rickardoberg/neo4j/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rickardoberg/neo4j/merges","archive_url":"https://api.github.com/repos/rickardoberg/neo4j/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rickardoberg/neo4j/downloads","issues_url":"https://api.github.com/repos/rickardoberg/neo4j/issues{/number}","pulls_url":"https://api.github.com/repos/rickardoberg/neo4j/pulls{/number}","milestones_url":"https://api.github.com/repos/rickardoberg/neo4j/milestones{/number}","notifications_url":"https://api.github.com/repos/rickardoberg/neo4j/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rickardoberg/neo4j/labels{/name}","releases_url":"https://api.github.com/repos/rickardoberg/neo4j/releases{/id}","created_at":"2012-11-13T07:06:50Z","updated_at":"2014-08-26T07:45:07Z","pushed_at":"2015-06-25T12:51:36Z","git_url":"git://github.com/rickardoberg/neo4j.git","ssh_url":"git@github.com:rickardoberg/neo4j.git","clone_url":"https://github.com/rickardoberg/neo4j.git","svn_url":"https://github.com/rickardoberg/neo4j","homepage":null,"size":200704,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"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":"neo4j:2.3","ref":"2.3","sha":"699ecd60892f962b49e09be985f761ebc78fcc70","user":{"login":"neo4j","id":201120,"avatar_url":"https://avatars.githubusercontent.com/u/201120?v=3","gravatar_id":"","url":"https://api.github.com/users/neo4j","html_url":"https://github.com/neo4j","followers_url":"https://api.github.com/users/neo4j/followers","following_url":"https://api.github.com/users/neo4j/following{/other_user}","gists_url":"https://api.github.com/users/neo4j/gists{/gist_id}","starred_url":"https://api.github.com/users/neo4j/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neo4j/subscriptions","organizations_url":"https://api.github.com/users/neo4j/orgs","repos_url":"https://api.github.com/users/neo4j/repos","events_url":"https://api.github.com/users/neo4j/events{/privacy}","received_events_url":"https://api.github.com/users/neo4j/received_events","type":"Organization","site_admin":false},"repo":{"id":6650539,"name":"neo4j","full_name":"neo4j/neo4j","owner":{"login":"neo4j","id":201120,"avatar_url":"https://avatars.githubusercontent.com/u/201120?v=3","gravatar_id":"","url":"https://api.github.com/users/neo4j","html_url":"https://github.com/neo4j","followers_url":"https://api.github.com/users/neo4j/followers","following_url":"https://api.github.com/users/neo4j/following{/other_user}","gists_url":"https://api.github.com/users/neo4j/gists{/gist_id}","starred_url":"https://api.github.com/users/neo4j/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neo4j/subscriptions","organizations_url":"https://api.github.com/users/neo4j/orgs","repos_url":"https://api.github.com/users/neo4j/repos","events_url":"https://api.github.com/users/neo4j/events{/privacy}","received_events_url":"https://api.github.com/users/neo4j/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/neo4j/neo4j","description":"Graphs for Everyone","fork":false,"url":"https://api.github.com/repos/neo4j/neo4j","forks_url":"https://api.github.com/repos/neo4j/neo4j/forks","keys_url":"https://api.github.com/repos/neo4j/neo4j/keys{/key_id}","collaborators_url":"https://api.github.com/repos/neo4j/neo4j/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/neo4j/neo4j/teams","hooks_url":"https://api.github.com/repos/neo4j/neo4j/hooks","issue_events_url":"https://api.github.com/repos/neo4j/neo4j/issues/events{/number}","events_url":"https://api.github.com/repos/neo4j/neo4j/events","assignees_url":"https://api.github.com/repos/neo4j/neo4j/assignees{/user}","branches_url":"https://api.github.com/repos/neo4j/neo4j/branches{/branch}","tags_url":"https://api.github.com/repos/neo4j/neo4j/tags","blobs_url":"https://api.github.com/repos/neo4j/neo4j/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/neo4j/neo4j/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/neo4j/neo4j/git/refs{/sha}","trees_url":"https://api.github.com/repos/neo4j/neo4j/git/trees{/sha}","statuses_url":"https://api.github.com/repos/neo4j/neo4j/statuses/{sha}","languages_url":"https://api.github.com/repos/neo4j/neo4j/languages","stargazers_url":"https://api.github.com/repos/neo4j/neo4j/stargazers","contributors_url":"https://api.github.com/repos/neo4j/neo4j/contributors","subscribers_url":"https://api.github.com/repos/neo4j/neo4j/subscribers","subscription_url":"https://api.github.com/repos/neo4j/neo4j/subscription","commits_url":"https://api.github.com/repos/neo4j/neo4j/commits{/sha}","git_commits_url":"https://api.github.com/repos/neo4j/neo4j/git/commits{/sha}","comments_url":"https://api.github.com/repos/neo4j/neo4j/comments{/number}","issue_comment_url":"https://api.github.com/repos/neo4j/neo4j/issues/comments{/number}","contents_url":"https://api.github.com/repos/neo4j/neo4j/contents/{+path}","compare_url":"https://api.github.com/repos/neo4j/neo4j/compare/{base}...{head}","merges_url":"https://api.github.com/repos/neo4j/neo4j/merges","archive_url":"https://api.github.com/repos/neo4j/neo4j/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/neo4j/neo4j/downloads","issues_url":"https://api.github.com/repos/neo4j/neo4j/issues{/number}","pulls_url":"https://api.github.com/repos/neo4j/neo4j/pulls{/number}","milestones_url":"https://api.github.com/repos/neo4j/neo4j/milestones{/number}","notifications_url":"https://api.github.com/repos/neo4j/neo4j/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/neo4j/neo4j/labels{/name}","releases_url":"https://api.github.com/repos/neo4j/neo4j/releases{/id}","created_at":"2012-11-12T08:46:15Z","updated_at":"2015-06-29T11:19:57Z","pushed_at":"2015-06-29T13:11:01Z","git_url":"git://github.com/neo4j/neo4j.git","ssh_url":"git@github.com:neo4j/neo4j.git","clone_url":"https://github.com/neo4j/neo4j.git","svn_url":"https://github.com/neo4j/neo4j","homepage":"http://neo4j.com","size":478741,"stargazers_count":1779,"watchers_count":1779,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":705,"mirror_url":null,"open_issues_count":453,"forks":705,"open_issues":453,"watchers":1779,"default_branch":"2.3"}},"_links":{"self":{"href":"https://api.github.com/repos/neo4j/neo4j/pulls/4848"},"html":{"href":"https://github.com/neo4j/neo4j/pull/4848"},"issue":{"href":"https://api.github.com/repos/neo4j/neo4j/issues/4848"},"comments":{"href":"https://api.github.com/repos/neo4j/neo4j/issues/4848/comments"},"review_comments":{"href":"https://api.github.com/repos/neo4j/neo4j/pulls/4848/comments"},"review_comment":{"href":"https://api.github.com/repos/neo4j/neo4j/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/neo4j/neo4j/pulls/4848/commits"},"statuses":{"href":"https://api.github.com/repos/neo4j/neo4j/statuses/b83cb5283d57a16aa872ab37e8dea2e26d504b11"}}}}