Closed
Conversation
Tests are still missing, so I have no idea whether this works this way.
f706ec7 to
0d53fa6
Compare
ePaul
commented
Nov 30, 2022
| * @param dataType the Java type of the objects for which the extractor is used. | ||
| * @param extractor a function which will extract the compaction key from an object. | ||
| */ | ||
| <X> void registerCompactionKeyExtractor(String eventType, Class<X> dataType, CompactionKeyExtractor<X> extractor); |
Member
Author
There was a problem hiding this comment.
For the snapshot triggering mechanism, we have the SnapshotEventGenerator interface, which an application needs to implement and provide as spring beans.
Here instead, the CompactionKeyExtractor (+ event-Type + Class) has to be passed to the registerCompactionKeyExtractor method on the EventLogWriter.
This can be seen as somewhat inconsistent. Should we try to do the same here?
- We get a wrapper class for these three things.
- The EventLogWriterImpl would get a list of these as constructor parameter.
- The Autoconfiguration collects beans of this type to inject them into the ELWImpl.
Then we can get rid of this register-method completely, and the interface of EventLogWriter would not change at all.
ePaul
commented
Nov 30, 2022
| * @see EventLogWriter#registerCompactionKeyExtractor(String, Class, CompactionKeyExtractor) | ||
| */ | ||
| @FunctionalInterface | ||
| public interface CompactionKeyExtractor<X> { |
Member
Author
There was a problem hiding this comment.
This is just a glorified Function<X, String>.
- change new files to JUnit 5 - replace @parameterized by subclasses
bf56602 to
5b03d6c
Compare
ePaul
commented
Dec 6, 2022
Comment on lines
+40
to
+42
| @Captor | ||
| private ArgumentCaptor<EventLog> eventLogCapture; | ||
|
|
Member
Author
There was a problem hiding this comment.
Unused variable.
Suggested change
| @Captor | |
| private ArgumentCaptor<EventLog> eventLogCapture; |
Member
Author
|
Replaced by #164. |
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.
This is implementing #154.