JDK-8336680 : Release Note: Add a System Property to Set the Maximum Number of `WatchService` Events before Overflow
  • Type: Sub-task
  • Component: core-libs
  • Sub-Component: java.nio
  • Affected Version: 23
  • Priority: P4
  • Status: Resolved
  • Resolution: Delivered
  • OS: generic
  • CPU: generic
  • Submitted: 2024-07-17
  • Updated: 2024-07-19
  • Resolved: 2024-07-18
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 23
23Resolved
Description
The `java.nio.file.WatchService` implementations buffer up to a maximum number of events before discarding events and then queuing the `OVERFLOW` event. A new system property, `jdk.nio.file.WatchService.maxEventsPerPoll`, has been added to allow someone to specify the maximum number of pending events which may be enqueued before an `OVERFLOW` event is emitted. The value of this property must be a positive integer.