uschindler commented on PR #13196:
URL: https://github.com/apache/lucene/pull/13196#issuecomment-2016496447

   Let's meet in the center:
   - I will add a public enum `PosixMFAdvise` to store package with enum 
constants named as the POSIX_MADV / POSIX_FADV constants (they are same, just 
different numbers)
   - IOContext becomes a `toPosixMFAdvise()` method that converts it into that 
enum (in a similar way like the previously mentioned private/internal method).
   - MMapDirectory by defaults uses this method to interpret the IOContext. As 
it's a `Function<IOContext,PosixMFAdvise>` you can configure it like the other 
MMapDirectoy. This allows us to play around in benchmarks and also allows to 
disable it completely.
   - Inside the private PosixNativeAccess class we just convert the enum to the 
low-level integer value.
   
   I can do this later. OK?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to