Module org.apache.lucene.core
Package org.apache.lucene.store
Class MappedByteBufferIndexInputProvider
java.lang.Object
org.apache.lucene.store.MappedByteBufferIndexInputProvider
- All Implemented Interfaces:
MMapDirectory.MMapIndexInputProvider<Object>
final class MappedByteBufferIndexInputProvider
extends Object
implements MMapDirectory.MMapIndexInputProvider<Object>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ByteBufferGuard.BufferCleaner
private static final Logger
private final String
private final boolean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static boolean
long
boolean
(package private) final ByteBuffer[]
map
(String resourceDescription, FileChannel fc, int chunkSizePower, boolean preload, long length) Maps a file into a set of buffersprivate static ByteBufferGuard.BufferCleaner
newBufferCleaner
(MethodHandle unmapper) openInput
(Path path, IOContext context, int chunkSizePower, boolean preload, Optional<String> unusedGroup, Object unusedAttachment) boolean
private static Object
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.lucene.store.MMapDirectory.MMapIndexInputProvider
attachment, convertMapFailedIOException
-
Field Details
-
LOG
-
cleaner
-
unmapSupported
private final boolean unmapSupported -
unmapNotSupportedReason
-
-
Constructor Details
-
MappedByteBufferIndexInputProvider
public MappedByteBufferIndexInputProvider()
-
-
Method Details
-
openInput
public IndexInput openInput(Path path, IOContext context, int chunkSizePower, boolean preload, Optional<String> unusedGroup, Object unusedAttachment) throws IOException - Specified by:
openInput
in interfaceMMapDirectory.MMapIndexInputProvider<Object>
- Throws:
IOException
-
getDefaultMaxChunkSize
public long getDefaultMaxChunkSize()- Specified by:
getDefaultMaxChunkSize
in interfaceMMapDirectory.MMapIndexInputProvider<Object>
-
isUnmapSupported
public boolean isUnmapSupported()- Specified by:
isUnmapSupported
in interfaceMMapDirectory.MMapIndexInputProvider<Object>
-
getUnmapNotSupportedReason
- Specified by:
getUnmapNotSupportedReason
in interfaceMMapDirectory.MMapIndexInputProvider<Object>
-
supportsMadvise
public boolean supportsMadvise()- Specified by:
supportsMadvise
in interfaceMMapDirectory.MMapIndexInputProvider<Object>
-
map
final ByteBuffer[] map(String resourceDescription, FileChannel fc, int chunkSizePower, boolean preload, long length) throws IOException Maps a file into a set of buffers- Throws:
IOException
-
checkUnmapHackSysprop
private static boolean checkUnmapHackSysprop() -
unmapHackImpl
-
newBufferCleaner
-