RFR: 8330077: Allow max number of events to be buffered to be configurable to avoid OVERFLOW_EVENT [v7]

Fabian Meumertzheim duke at openjdk.org
Thu Apr 18 07:20:27 UTC 2024


On Wed, 17 Apr 2024 20:30:26 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

>> Fabian Meumertzheim has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Move `@implNote`
>
> src/java.base/share/classes/java/nio/file/WatchService.java line 111:
> 
>> 109:  * StandardWatchEventKinds#OVERFLOW OVERFLOW} event.
>> 110:  *
>> 111:  * @since 1.7
> 
> @fmeum What do you think of this slightly modified version of the implementation note?
> 
> 
>  * @implNote
>  * In the reference implementation, the maximum size of the list of events
>  * returned by {@link WatchKey#pollEvents() WatchKey.pollEvents} is controlled
>  * by the system property {@code jdk.nio.file.WatchService.maxEventsPerPoll}.
>  * If this property is not set or cannot be parsed as an integer, then the
>  * maximum event list size will be set to 512; if the property is parsed as a
>  * non-positive integer, then the maximum event size will be {@code 1} (unity).
>  * If more events occur than the maximum size of the event list, the pending
>  * events are cleared and replaced with a single
>  * {@link StandardWatchEventKinds#OVERFLOW OVERFLOW} event.
>  *

I like it, pushed the change.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/18739#discussion_r1570138432


More information about the nio-dev mailing list