thecoop commented on code in PR #14482: URL: https://github.com/apache/lucene/pull/14482#discussion_r2055502471
########## lucene/core/src/java/org/apache/lucene/store/Directory.java: ########## @@ -79,6 +83,31 @@ public abstract class Directory implements Closeable { */ public abstract long fileLength(String name) throws IOException; + protected void validateIOContext(IOContext context) { + Map<Class<? extends IOContext.FileOpenHint>, List<IOContext.FileOpenHint>> hintClasses = + context.hints().stream().collect(Collectors.groupingBy(IOContext.FileOpenHint::getClass)); + + // there should only be one of FileType, FileData, DataAccess Review Comment: Because some uses can only specify some of the hint types - eg [here](https://github.com/apache/lucene/pull/14510/files#diff-6b2f0b03b74eed609dc835a669a38299f6bd24a3c2431cf7d58de27a869fc96e). I also want the ability to specify other hint types if necessary, eg [here](https://github.com/apache/lucene/pull/14509/commits/62fffb269edc6b7e981396a6a99f44b98d005c37) and [here](https://github.com/apache/lucene/pull/14510/files#diff-498e50abd4c94dc980f7bb096e63b64051a2ac77053f0a943643206699962bbc). -- 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