-
Notifications
You must be signed in to change notification settings - Fork 0
Improved overflow support: Internal EventHandlingWatch interface
#19
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
Improved overflow support: Internal EventHandlingWatch interface
#19
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## improved-overflow-support-main #19 +/- ##
==================================================================
- Coverage 80.5% 80.3% -0.2%
- Complexity 91 94 +3
==================================================================
Files 11 12 +1
Lines 416 428 +12
Branches 41 41
==================================================================
+ Hits 335 344 +9
- Misses 59 61 +2
- Partials 22 23 +1 ☔ View full report in Codecov by Sentry. |
…erflow-support/richer-active-watch
…support/richer-active-watch
ActiveWatchActiveWatch interface
DavyLandman
left a comment
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 want to keep ActiveWatch as small and focussed as possible.
| * file system libraries trigger the event handler "from the inside"). This | ||
| * is useful to report synthetic events (e.g., while handling overflows). | ||
| */ | ||
| void handleEvent(WatchEvent event); |
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.
In a public interface, this feels a bit weird, I want to keep this interface as small as possible, to allow us to improve the API without breaking compatibility.
Maybe this should be an internal/private interface?
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.
Agreed. I've extracted handleEvent and relativize into a separate interface in the impl package, called EventHandlingWatch.
ActiveWatch interfaceEventHandlingWatch interface
EventHandlingWatch interfaceEventHandlingWatch interface
DavyLandman
left a comment
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.
Much better 👍🏼
This PR adds a new internal interface,
EventHandlingWatch, which extends the existing external interfaceActiveWatch. In the next PRs,EventHandlingWatchwill be generically used as a type in overflow event handlers instead ofJDK...Watch. That's useful because these overflow handlers may also be used by non-JDK watches.