-
Notifications
You must be signed in to change notification settings - Fork 12
CommandStore as a Repository #394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ository Conflicts: server/src/main/java/org/spine3/server/command/CommandStorage.java
Conflicts: server/src/main/java/org/spine3/server/entity/AbstractEntity.java
Also: * Removed `BoundedContext` ctor parameter required for `Repository` and made it where dependency on a `BoundedContext` is really needed. * Removed `CommandStorage` as an abstract class that needs to be implemented and created by a `StorageFactory`.
Also removed `@SPI` annotation from `CommandStore`, which is package-private can is not SPI because of this.
Codecov Report
@@ Coverage Diff @@
## master #394 +/- ##
============================================
+ Coverage 92.86% 92.88% +0.01%
- Complexity 2352 2355 +3
============================================
Files 230 229 -1
Lines 7516 7532 +16
Branches 541 543 +2
============================================
+ Hits 6980 6996 +16
- Misses 411 414 +3
+ Partials 125 122 -3 Continue to review full report at Codecov.
|
@armiol, PTAL. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alexander-yevsyukov LGTM except for the Javadoc wording issues. Please take a look at those before merging.
* @param status | ||
* a command status to set in the record | ||
* @param generatedCommandId | ||
* a command ID to used because the passed command does not have own ID. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be ... to be used...
or ... to use ...
.
* a command status to set in the record | ||
* @param generatedCommandId | ||
* a command ID to used because the passed command does not have own ID. | ||
* If the command has own ID this parameter is {@code null}. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please insert a comma after has own ID
.
* But this ID does not belong to the command. | ||
* | ||
* <p>Therefore, commands without ID can be found by records | ||
* where `command.context.command_id` field is empty. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we use {@code command.context.command_id}
instead of backquotes?
|
||
/** The repository completed the catch-up process. */ | ||
ONLINE, | ||
/** If {@code true} the projection will {@link #catchUp()} after initialization. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would add an alternative text to this {@link #catchUp()}
.
This PR implements
CommandStore
as aRepository
.Breaking changes:
Repository
now does not haveBoundedContext
constructor argument.AggregatePartRepository
,ProcessManagerRepository
, andProjectionRepository
still have such a constructor argument.CommandStore
creates its storage with the help ofStorageFactory
for creatingCommandStore
as a repository.StorageFactory
does not produceCommandStorage
any more.InMemoryCommandStorage
class was also removed.