Details
-
Wish
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
New
Description
It would be really useful if NIOFSDirectory and MMapDirectory had static methods for opening an input for arbitrary Files
SimpleFSDirectory should likewise have a static openInput(File) method in order to cover all basis (right now, SimpleFSIndexInput only has protected access
This allows creating a custom FSDirectory implementation that can use any criteria desired to determine what Input implementation to use for opening a file.
I know the FileSwitchDirectory provides some ability to do this, however that locks the selection criteria down to only the file extension in use
also, the FileSwitchDirectory approach seems to want to have each directory at different paths (as list() methods just cat the directory listings of the sub directories, which could cause havoc if both sub directories point to the same FS path?)
opening up these static openInput() methods would allow creating a custom FS store implementation that would could for instance mmap files of a particular type and size and use NIO for other files, and mabye even use the SimpleFS input for a third category of files. Could also then apply different buffer sizes to different files, perform RAM caching of particular inputs, etc