bruno-roustant commented on a change in pull request #2166:
URL: https://github.com/apache/lucene-solr/pull/2166#discussion_r552628244



##########
File path: solr/core/src/java/org/apache/solr/core/CachingDirectoryFactory.java
##########
@@ -339,10 +332,10 @@ public boolean exists(String path) throws IOException {
    * (non-Javadoc)
    *
    * @see org.apache.solr.core.DirectoryFactory#get(java.lang.String,
-   * java.lang.String, boolean)
+   * java.lang.String, boolean, java.util.function.Function)
    */
   @Override
-  public final Directory get(String path, DirContext dirContext, String 
rawLockType)
+  public final Directory get(String path, DirContext dirContext, String 
rawLockType, Function<Directory, Directory> wrappingFunction)

Review comment:
       A sample usage could be a BlobDF extending DelegatingDF to delegate to 
*any* configured DF, probably MMapDF which is a CachingDF. BlobDF would need to 
create BlobDir that delegates to a MMapDir. BlobDir cannot wrap the MMapDir 
outside of the CachingDF, because for the cache to actually work, it has to 
cache the BlobDir instance. That's why the idea is to provide a wrapper 
function to wrap a MMapDir with a BlobDir when it is created internally by the 
CachingDF.




----------------------------------------------------------------
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.

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