{"action":"created","comment":{"url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/pulls/comments/175485757","pull_request_review_id":105021908,"id":175485757,"diff_hunk":"@@ -43,45 +50,57 @@ public long append(final Stream<JsonEnvelope> events, final Tolerance tolerance)\n             case NON_CONSECUTIVE:\n                 return eventStreamManager.appendNonConsecutively(id, events);\n             default:\n-                final Optional<Long> lastReadVersion = this.lastReadVersion;\n+                final Optional<Long> lastReadVersion = this.lastReadPosition;\n                 return lastReadVersion.isPresent()\n-                        ? eventStreamManager.appendAfter(id, events.map(this::incrementLastReadVersion), lastReadVersion.get())\n+                        ? eventStreamManager.appendAfter(id, events.map(this::incrementLastReadPosition), lastReadVersion.get())\n                         : eventStreamManager.append(id, events);\n         }\n     }\n \n     @Override\n-    public long appendAfter(final Stream<JsonEnvelope> events, final long version) throws EventStreamException {\n-        return eventStreamManager.appendAfter(id, events, version);\n+    public long appendAfter(final Stream<JsonEnvelope> events, final long position) throws EventStreamException {\n+        return eventStreamManager.appendAfter(id, events, position);\n+    }\n+\n+    @Override\n+    public long getPosition() {\n+        final long streamPosition = eventStreamManager.getStreamPosition(id);\n+        return streamPosition;\n     }\n \n     @Override\n     public long getCurrentVersion() {\n-        final Optional<Long> lastReadVersion = this.lastReadVersion;\n-        return lastReadVersion.isPresent() ? lastReadVersion.get() : eventStreamManager.getCurrentVersion(id);\n+        final Optional<Long> lastReadPosition = this.lastReadPosition;\n+        return lastReadPosition.isPresent() ? lastReadPosition.get() : eventStreamManager.getSize(id);\n+    }\n+\n+    @Override\n+    public long size() {\n+        final Optional<Long> lastReadPosition = this.lastReadPosition;\n+        return lastReadPosition.isPresent() ? lastReadPosition.get() : eventStreamManager.getSize(id);\n     }\n \n     @Override\n     public UUID getId() {\n         return id;\n     }\n \n-    private JsonEnvelope recordCurrentVersion(final JsonEnvelope event) {\n-        lastReadVersion = Optional.of(\n+    private JsonEnvelope recordCurrentPosition(final JsonEnvelope event) {\n+        lastReadPosition = Optional.of(\n                 event.metadata().version()","path":"event-sourcing/event-source/src/main/java/uk/gov/justice/services/eventsourcing/source/core/EnvelopeEventStream.java","position":86,"original_position":86,"commit_id":"43afb73c1a34fcbf940e3e1ea645ba777fb63a46","original_commit_id":"43afb73c1a34fcbf940e3e1ea645ba777fb63a46","user":{"login":"cjs-common-platform-ci","id":17479508,"avatar_url":"https://avatars2.githubusercontent.com/u/17479508?v=4","gravatar_id":"","url":"https://api.github.com/users/cjs-common-platform-ci","html_url":"https://github.com/cjs-common-platform-ci","followers_url":"https://api.github.com/users/cjs-common-platform-ci/followers","following_url":"https://api.github.com/users/cjs-common-platform-ci/following{/other_user}","gists_url":"https://api.github.com/users/cjs-common-platform-ci/gists{/gist_id}","starred_url":"https://api.github.com/users/cjs-common-platform-ci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cjs-common-platform-ci/subscriptions","organizations_url":"https://api.github.com/users/cjs-common-platform-ci/orgs","repos_url":"https://api.github.com/users/cjs-common-platform-ci/repos","events_url":"https://api.github.com/users/cjs-common-platform-ci/events{/privacy}","received_events_url":"https://api.github.com/users/cjs-common-platform-ci/received_events","type":"User","site_admin":false},"body":"![MINOR](https://sonarsource.github.io/sonar-github/severity-minor.png 'Severity: MINOR') Remove this use of \"version\"; it is deprecated. [![rule](https://sonarsource.github.io/sonar-github/rule.png)](https://sonarcloud.io/coding_rules#rule_key=squid%3ACallToDeprecatedMethod)\n","created_at":"2018-03-19T15:51:54Z","updated_at":"2018-03-19T15:51:54Z","html_url":"https://github.com/CJSCommonPlatform/microservice_framework/pull/558#discussion_r175485757","pull_request_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/pulls/558","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/pulls/comments/175485757"},"html":{"href":"https://github.com/CJSCommonPlatform/microservice_framework/pull/558#discussion_r175485757"},"pull_request":{"href":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/pulls/558"}}},"pull_request":{"url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/pulls/558","id":174617129,"html_url":"https://github.com/CJSCommonPlatform/microservice_framework/pull/558","diff_url":"https://github.com/CJSCommonPlatform/microservice_framework/pull/558.diff","patch_url":"https://github.com/CJSCommonPlatform/microservice_framework/pull/558.patch","issue_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/issues/558","number":558,"state":"open","locked":false,"title":"Dev/event store jdbc services","user":{"login":"MartinYSpasov","id":4839261,"avatar_url":"https://avatars3.githubusercontent.com/u/4839261?v=4","gravatar_id":"","url":"https://api.github.com/users/MartinYSpasov","html_url":"https://github.com/MartinYSpasov","followers_url":"https://api.github.com/users/MartinYSpasov/followers","following_url":"https://api.github.com/users/MartinYSpasov/following{/other_user}","gists_url":"https://api.github.com/users/MartinYSpasov/gists{/gist_id}","starred_url":"https://api.github.com/users/MartinYSpasov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MartinYSpasov/subscriptions","organizations_url":"https://api.github.com/users/MartinYSpasov/orgs","repos_url":"https://api.github.com/users/MartinYSpasov/repos","events_url":"https://api.github.com/users/MartinYSpasov/events{/privacy}","received_events_url":"https://api.github.com/users/MartinYSpasov/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-03-13T10:33:55Z","updated_at":"2018-03-19T15:51:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ff4849c1f4ef04a0678554f3c37851e566c00762","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/pulls/558/commits","review_comments_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/pulls/558/comments","review_comment_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/issues/558/comments","statuses_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/statuses/43afb73c1a34fcbf940e3e1ea645ba777fb63a46","head":{"label":"CJSCommonPlatform:dev/event-store-jdbc-services","ref":"dev/event-store-jdbc-services","sha":"43afb73c1a34fcbf940e3e1ea645ba777fb63a46","user":{"login":"CJSCommonPlatform","id":16131145,"avatar_url":"https://avatars3.githubusercontent.com/u/16131145?v=4","gravatar_id":"","url":"https://api.github.com/users/CJSCommonPlatform","html_url":"https://github.com/CJSCommonPlatform","followers_url":"https://api.github.com/users/CJSCommonPlatform/followers","following_url":"https://api.github.com/users/CJSCommonPlatform/following{/other_user}","gists_url":"https://api.github.com/users/CJSCommonPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/CJSCommonPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CJSCommonPlatform/subscriptions","organizations_url":"https://api.github.com/users/CJSCommonPlatform/orgs","repos_url":"https://api.github.com/users/CJSCommonPlatform/repos","events_url":"https://api.github.com/users/CJSCommonPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/CJSCommonPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":51292541,"name":"microservice_framework","full_name":"CJSCommonPlatform/microservice_framework","owner":{"login":"CJSCommonPlatform","id":16131145,"avatar_url":"https://avatars3.githubusercontent.com/u/16131145?v=4","gravatar_id":"","url":"https://api.github.com/users/CJSCommonPlatform","html_url":"https://github.com/CJSCommonPlatform","followers_url":"https://api.github.com/users/CJSCommonPlatform/followers","following_url":"https://api.github.com/users/CJSCommonPlatform/following{/other_user}","gists_url":"https://api.github.com/users/CJSCommonPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/CJSCommonPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CJSCommonPlatform/subscriptions","organizations_url":"https://api.github.com/users/CJSCommonPlatform/orgs","repos_url":"https://api.github.com/users/CJSCommonPlatform/repos","events_url":"https://api.github.com/users/CJSCommonPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/CJSCommonPlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CJSCommonPlatform/microservice_framework","description":"A Java framework to support applications utilising CQRS and Event Sourcing architectures","fork":false,"url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework","forks_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/forks","keys_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/teams","hooks_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/hooks","issue_events_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/issues/events{/number}","events_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/events","assignees_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/assignees{/user}","branches_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/branches{/branch}","tags_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/tags","blobs_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/statuses/{sha}","languages_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/languages","stargazers_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/stargazers","contributors_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/contributors","subscribers_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/subscribers","subscription_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/subscription","commits_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/issues/comments{/number}","contents_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/contents/{+path}","compare_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/merges","archive_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/downloads","issues_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/issues{/number}","pulls_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/pulls{/number}","milestones_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/milestones{/number}","notifications_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/labels{/name}","releases_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/releases{/id}","deployments_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/deployments","created_at":"2016-02-08T10:51:31Z","updated_at":"2018-03-16T12:08:42Z","pushed_at":"2018-03-19T15:46:09Z","git_url":"git://github.com/CJSCommonPlatform/microservice_framework.git","ssh_url":"git@github.com:CJSCommonPlatform/microservice_framework.git","clone_url":"https://github.com/CJSCommonPlatform/microservice_framework.git","svn_url":"https://github.com/CJSCommonPlatform/microservice_framework","homepage":"","size":8956,"stargazers_count":20,"watchers_count":20,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":26,"mirror_url":null,"archived":false,"open_issues_count":22,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":26,"open_issues":22,"watchers":20,"default_branch":"master"}},"base":{"label":"CJSCommonPlatform:master","ref":"master","sha":"aa5f410b7a4cea4a42e3aa078a99f30bcbb6164b","user":{"login":"CJSCommonPlatform","id":16131145,"avatar_url":"https://avatars3.githubusercontent.com/u/16131145?v=4","gravatar_id":"","url":"https://api.github.com/users/CJSCommonPlatform","html_url":"https://github.com/CJSCommonPlatform","followers_url":"https://api.github.com/users/CJSCommonPlatform/followers","following_url":"https://api.github.com/users/CJSCommonPlatform/following{/other_user}","gists_url":"https://api.github.com/users/CJSCommonPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/CJSCommonPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CJSCommonPlatform/subscriptions","organizations_url":"https://api.github.com/users/CJSCommonPlatform/orgs","repos_url":"https://api.github.com/users/CJSCommonPlatform/repos","events_url":"https://api.github.com/users/CJSCommonPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/CJSCommonPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":51292541,"name":"microservice_framework","full_name":"CJSCommonPlatform/microservice_framework","owner":{"login":"CJSCommonPlatform","id":16131145,"avatar_url":"https://avatars3.githubusercontent.com/u/16131145?v=4","gravatar_id":"","url":"https://api.github.com/users/CJSCommonPlatform","html_url":"https://github.com/CJSCommonPlatform","followers_url":"https://api.github.com/users/CJSCommonPlatform/followers","following_url":"https://api.github.com/users/CJSCommonPlatform/following{/other_user}","gists_url":"https://api.github.com/users/CJSCommonPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/CJSCommonPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CJSCommonPlatform/subscriptions","organizations_url":"https://api.github.com/users/CJSCommonPlatform/orgs","repos_url":"https://api.github.com/users/CJSCommonPlatform/repos","events_url":"https://api.github.com/users/CJSCommonPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/CJSCommonPlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CJSCommonPlatform/microservice_framework","description":"A Java framework to support applications utilising CQRS and Event Sourcing architectures","fork":false,"url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework","forks_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/forks","keys_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/teams","hooks_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/hooks","issue_events_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/issues/events{/number}","events_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/events","assignees_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/assignees{/user}","branches_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/branches{/branch}","tags_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/tags","blobs_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/statuses/{sha}","languages_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/languages","stargazers_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/stargazers","contributors_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/contributors","subscribers_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/subscribers","subscription_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/subscription","commits_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/issues/comments{/number}","contents_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/contents/{+path}","compare_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/merges","archive_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/downloads","issues_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/issues{/number}","pulls_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/pulls{/number}","milestones_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/milestones{/number}","notifications_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/labels{/name}","releases_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/releases{/id}","deployments_url":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/deployments","created_at":"2016-02-08T10:51:31Z","updated_at":"2018-03-16T12:08:42Z","pushed_at":"2018-03-19T15:46:09Z","git_url":"git://github.com/CJSCommonPlatform/microservice_framework.git","ssh_url":"git@github.com:CJSCommonPlatform/microservice_framework.git","clone_url":"https://github.com/CJSCommonPlatform/microservice_framework.git","svn_url":"https://github.com/CJSCommonPlatform/microservice_framework","homepage":"","size":8956,"stargazers_count":20,"watchers_count":20,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":26,"mirror_url":null,"archived":false,"open_issues_count":22,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":26,"open_issues":22,"watchers":20,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/pulls/558"},"html":{"href":"https://github.com/CJSCommonPlatform/microservice_framework/pull/558"},"issue":{"href":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/issues/558"},"comments":{"href":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/issues/558/comments"},"review_comments":{"href":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/pulls/558/comments"},"review_comment":{"href":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/pulls/558/commits"},"statuses":{"href":"https://api.github.com/repos/CJSCommonPlatform/microservice_framework/statuses/43afb73c1a34fcbf940e3e1ea645ba777fb63a46"}},"author_association":"NONE"}}
{"actor":{"display_login":"cjs-common-platform-ci"}}