sample: add counter using ReplicatedEntity#26
Merged
Conversation
* based on the valueentity-counter but using ReplicatedEntity * using codegen like classes, but codegen for ReplicatedEntity doesn't exist yet
patriknw
commented
Jun 11, 2021
|
|
||
| public CounterImpl(ReplicatedEntityCreationContext context) { // <2> | ||
| this.entityId = context.entityId(); | ||
| this.counter = context.state(PNCounter.class).orElseGet(context::newPNCounter); |
Contributor
Author
There was a problem hiding this comment.
By mistake I first used GCounter here, strange that it worked with decrement. Anyway, changed to PNCounter
pvlugter
reviewed
Jun 14, 2021
Member
pvlugter
left a comment
There was a problem hiding this comment.
Cool, LGTM.
Should GCounter be removed in this PR though?
| @@ -0,0 +1,335 @@ | |||
| <?xml version="1.0" encoding="UTF-8"?> | |||
Member
There was a problem hiding this comment.
Should the dependency-reduced-pom.xml file be committed, or gitignored?
Contributor
Author
There was a problem hiding this comment.
it's generated by the maven plugin, I removed it again and added to gitignore
cbbe580 to
e222801
Compare
Contributor
Author
thanks, that was supposed to be in another PR, reverted |
pvlugter
approved these changes
Jun 15, 2021
Co-authored-by: Peter Vlugter <pvlugter@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I will use this as baseline when trying out SDK API changes for ReplicatedEntity. We can merge this first.