RFR: 8330077: Allow max number of events to be buffered to be configurable to avoid OVERFLOW_EVENT [v7]
Brian Burkhalter
bpb at openjdk.org
Thu Apr 18 15:33:58 UTC 2024
On Thu, 18 Apr 2024 07:16:51 GMT, Fabian Meumertzheim <duke at openjdk.org> wrote:
>> 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.
Thanks. @alan and @fmeum , does this look sufficiently good now to create a CSR?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18739#discussion_r1570980697
More information about the nio-dev
mailing list